Don't discard read data on flush if seek fails.
Nick Ing-Simmons [Fri, 7 Jun 2002 10:11:51 +0000 (10:11 +0000)]
p4raw-id: //depot/perlio@17053

perlio.c

index 96aa0c9..e1cbbdc 100644 (file)
--- a/perlio.c
+++ b/perlio.c
@@ -3123,6 +3123,9 @@ PerlIOBuf_flush(pTHX_ PerlIO *f)
                /* Reload n as some layers may pop themselves on seek */
                b->posn = PerlIO_tell(n = PerlIONext(f));
            }
+           else {
+               return code;
+           }
        }
     }
     b->ptr = b->end = b->buf;