diff --git a/Lib/tarfile.py b/Lib/tarfile.py index 8ed87c2f43a..df4745d6ba3 100755 --- a/Lib/tarfile.py +++ b/Lib/tarfile.py @@ -2153,10 +2153,10 @@ class TarFile(object): for offset, size in tarinfo.sparse: target.seek(offset) copyfileobj(source, target, size, ReadError) + target.seek(tarinfo.size) + target.truncate() else: copyfileobj(source, target, tarinfo.size, ReadError) - target.seek(tarinfo.size) - target.truncate() def makeunknown(self, tarinfo, targetpath): """Make a file from a TarInfo object with an unknown type diff --git a/Misc/ACKS b/Misc/ACKS index bfdd1079f5b..860eeb33aaa 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -462,6 +462,7 @@ Stefan Franke Martin Franklin Kent Frazier Bruce Frederiksen +Jason Fried Robin Friedrich Bradley Froehle Ivan Frohne