From 1b7caf3368675eb6825e0dca77782a141dfa0392 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 23 Sep 2009 23:19:38 +0000 Subject: Wow, ok, file was broken on changing position in the stream, it wouldn't reset the end of stream flag. Now it does reset it, and assumes that you've placed the position not at the end, if you have, it will detect it again immediately upon read. BZip2 now provides a method of getting the number of bytes written out, i.e. the compressed size of the output, I have to figure out the input side next... --- src/file.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/file.cpp') diff --git a/src/file.cpp b/src/file.cpp index 6228ba9..1c26001 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -93,6 +93,7 @@ void Bu::File::seek( long offset ) throw FileException("File not open."); lseek( fd, offset, SEEK_CUR ); + bEos = false; } void Bu::File::setPos( long pos ) @@ -101,6 +102,7 @@ void Bu::File::setPos( long pos ) throw FileException("File not open."); lseek( fd, pos, SEEK_SET ); + bEos = false; } void Bu::File::setPosEnd( long pos ) @@ -109,6 +111,7 @@ void Bu::File::setPosEnd( long pos ) throw FileException("File not open."); lseek( fd, pos, SEEK_END ); + bEos = false; } bool Bu::File::isEos() -- cgit v1.2.3