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

Unified Diff: dfvfs/file_io/encoded_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 | « dfvfs/file_io/compressed_stream_io.py ('k') | dfvfs/file_io/encrypted_stream_io.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dfvfs/file_io/encoded_stream_io.py
diff --git a/dfvfs/file_io/encoded_stream_io.py b/dfvfs/file_io/encoded_stream_io.py
index f199d9a100d45739bc68243b74004538f56ad8d7..4809e69e8865390b0617447af944557bf89295a8 100644
--- a/dfvfs/file_io/encoded_stream_io.py
+++ b/dfvfs/file_io/encoded_stream_io.py
@@ -303,9 +303,9 @@ class EncodedStream(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._decoded_stream_size
+ offset += self.get_size()
elif whence != os.SEEK_SET:
raise IOError(u'Unsupported whence.')
if offset < 0:
« no previous file with comments | « dfvfs/file_io/compressed_stream_io.py ('k') | dfvfs/file_io/encrypted_stream_io.py » ('j') | no next file with comments »

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