summaryrefslogtreecommitdiff
path: root/Lib/tarfile.py
diff options
context:
space:
mode:
authorLars Gustäbel <lars@gustaebel.de>2007-12-01 21:02:12 +0000
committerLars Gustäbel <lars@gustaebel.de>2007-12-01 21:02:12 +0000
commitd8bdf9486f0425adaef170d89c8019932186fb79 (patch)
treeee5f03ed091adae7dfe36bec7198067a2e1ab876 /Lib/tarfile.py
parentf2aefbf129653f042388580592bfd3308a554e8c (diff)
downloadcpython-d8bdf9486f0425adaef170d89c8019932186fb79.tar.gz
Issue #1531: Read fileobj from the current offset, do not seek to
the start. (will backport to 2.5)
Diffstat (limited to 'Lib/tarfile.py')
-rw-r--r--Lib/tarfile.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/tarfile.py b/Lib/tarfile.py
index ee9922c60a..ae242912e9 100644
--- a/Lib/tarfile.py
+++ b/Lib/tarfile.py
@@ -1558,7 +1558,8 @@ class TarFile(object):
self.closed = False
self.members = [] # list of members as TarInfo objects
self._loaded = False # flag if all members have been read
- self.offset = 0L # current position in the archive file
+ self.offset = self.fileobj.tell()
+ # current position in the archive file
self.inodes = {} # dictionary caching the inodes of
# archive members already added