diff options
author | Mike Buland <eichlan@xagasoft.com> | 2009-09-23 23:19:38 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2009-09-23 23:19:38 +0000 |
commit | 1b7caf3368675eb6825e0dca77782a141dfa0392 (patch) | |
tree | 01fb357534875c7a69199e4dd3f0c9d8810810e2 /src/file.cpp | |
parent | 319a773dfcb187bc7e87ae6d64df3b6b6ec4831a (diff) | |
download | libbu++-1b7caf3368675eb6825e0dca77782a141dfa0392.tar.gz libbu++-1b7caf3368675eb6825e0dca77782a141dfa0392.tar.bz2 libbu++-1b7caf3368675eb6825e0dca77782a141dfa0392.tar.xz libbu++-1b7caf3368675eb6825e0dca77782a141dfa0392.zip |
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...
Diffstat (limited to 'src/file.cpp')
-rw-r--r-- | src/file.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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 ) | |||
93 | throw FileException("File not open."); | 93 | throw FileException("File not open."); |
94 | 94 | ||
95 | lseek( fd, offset, SEEK_CUR ); | 95 | lseek( fd, offset, SEEK_CUR ); |
96 | bEos = false; | ||
96 | } | 97 | } |
97 | 98 | ||
98 | void Bu::File::setPos( long pos ) | 99 | void Bu::File::setPos( long pos ) |
@@ -101,6 +102,7 @@ void Bu::File::setPos( long pos ) | |||
101 | throw FileException("File not open."); | 102 | throw FileException("File not open."); |
102 | 103 | ||
103 | lseek( fd, pos, SEEK_SET ); | 104 | lseek( fd, pos, SEEK_SET ); |
105 | bEos = false; | ||
104 | } | 106 | } |
105 | 107 | ||
106 | void Bu::File::setPosEnd( long pos ) | 108 | void Bu::File::setPosEnd( long pos ) |
@@ -109,6 +111,7 @@ void Bu::File::setPosEnd( long pos ) | |||
109 | throw FileException("File not open."); | 111 | throw FileException("File not open."); |
110 | 112 | ||
111 | lseek( fd, pos, SEEK_END ); | 113 | lseek( fd, pos, SEEK_END ); |
114 | bEos = false; | ||
112 | } | 115 | } |
113 | 116 | ||
114 | bool Bu::File::isEos() | 117 | bool Bu::File::isEos() |