Merge 3.5, issue #27194

This commit is contained in:
Łukasz Langa 2016-06-11 16:56:18 -07:00
commit 5135e9ed51
2 changed files with 3 additions and 2 deletions

View File

@ -2153,10 +2153,10 @@ class TarFile(object):
for offset, size in tarinfo.sparse: for offset, size in tarinfo.sparse:
target.seek(offset) target.seek(offset)
copyfileobj(source, target, size, ReadError) copyfileobj(source, target, size, ReadError)
else:
copyfileobj(source, target, tarinfo.size, ReadError)
target.seek(tarinfo.size) target.seek(tarinfo.size)
target.truncate() target.truncate()
else:
copyfileobj(source, target, tarinfo.size, ReadError)
def makeunknown(self, tarinfo, targetpath): def makeunknown(self, tarinfo, targetpath):
"""Make a file from a TarInfo object with an unknown type """Make a file from a TarInfo object with an unknown type

View File

@ -462,6 +462,7 @@ Stefan Franke
Martin Franklin Martin Franklin
Kent Frazier Kent Frazier
Bruce Frederiksen Bruce Frederiksen
Jason Fried
Robin Friedrich Robin Friedrich
Bradley Froehle Bradley Froehle
Ivan Frohne Ivan Frohne