Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5135e9e

Browse files
committed
Merge 3.5, issue #27194
2 parents 6a7506a + e7f2748 commit 5135e9e

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

Lib/tarfile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2153,10 +2153,10 @@ def makefile(self, tarinfo, targetpath):
21532153
for offset, size in tarinfo.sparse:
21542154
target.seek(offset)
21552155
copyfileobj(source, target, size, ReadError)
2156+
target.seek(tarinfo.size)
2157+
target.truncate()
21562158
else:
21572159
copyfileobj(source, target, tarinfo.size, ReadError)
2158-
target.seek(tarinfo.size)
2159-
target.truncate()
21602160

21612161
def makeunknown(self, tarinfo, targetpath):
21622162
"""Make a file from a TarInfo object with an unknown type

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@ Stefan Franke
462462
Martin Franklin
463463
Kent Frazier
464464
Bruce Frederiksen
465+
Jason Fried
465466
Robin Friedrich
466467
Bradley Froehle
467468
Ivan Frohne

0 commit comments

Comments
 (0)