Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(608)

Unified Diff: dfvfs/file_io/compressed_stream_io.py

Issue 323820043: [dfvfs] Fix bug with negative seeks for encrypted, encoded, and compressed streams. #183 (Closed)
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | dfvfs/file_io/encoded_stream_io.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dfvfs/file_io/compressed_stream_io.py
diff --git a/dfvfs/file_io/compressed_stream_io.py b/dfvfs/file_io/compressed_stream_io.py
index ad1859b12fde170ad21c8d00ad30c70665873e83..c8d7474952c873446e0a1caaf0c89f1a38fd2749 100644
--- a/dfvfs/file_io/compressed_stream_io.py
+++ b/dfvfs/file_io/compressed_stream_io.py
@@ -282,9 +282,9 @@ class CompressedStream(file_io.FileIO):
self._current_offset))
if whence == os.SEEK_CUR:
- offset += self._current_offset
+ offset += self.get_offset()
elif whence == os.SEEK_END:
- offset += self._uncompressed_stream_size
+ offset += self.get_size()
elif whence != os.SEEK_SET:
raise IOError(u'Unsupported whence.')
if offset < 0:
« no previous file with comments | « no previous file | dfvfs/file_io/encoded_stream_io.py » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b