summaryrefslogtreecommitdiffstats
path: root/Lib/tarfile.py
diff options
context:
space:
mode:
authorLars Gustäbel <lars@gustaebel.de>2008-01-04 14:00:33 (GMT)
committerLars Gustäbel <lars@gustaebel.de>2008-01-04 14:00:33 (GMT)
commit2ee1c760cc5845c06c0de98c3327299b3d72eb20 (patch)
treebe2f824b1c2959791983b493b960b43a78ac54bf /Lib/tarfile.py
parent0687561c940064e41ef1f89dc63aa6218161d2b9 (diff)
downloadcpython-2ee1c760cc5845c06c0de98c3327299b3d72eb20.zip
cpython-2ee1c760cc5845c06c0de98c3327299b3d72eb20.tar.gz
cpython-2ee1c760cc5845c06c0de98c3327299b3d72eb20.tar.bz2
Issue #1735: TarFile.extractall() now correctly sets
directory permissions and times. (will backport to 2.5)
Diffstat (limited to 'Lib/tarfile.py')
-rw-r--r--Lib/tarfile.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/tarfile.py b/Lib/tarfile.py
index ae24291..7143f0b 100644
--- a/Lib/tarfile.py
+++ b/Lib/tarfile.py
@@ -2037,11 +2037,11 @@ class TarFile(object):
# Set correct owner, mtime and filemode on directories.
for tarinfo in directories:
- path = os.path.join(path, tarinfo.name)
+ dirpath = os.path.join(path, tarinfo.name)
try:
- self.chown(tarinfo, path)
- self.utime(tarinfo, path)
- self.chmod(tarinfo, path)
+ self.chown(tarinfo, dirpath)
+ self.utime(tarinfo, dirpath)
+ self.chmod(tarinfo, dirpath)
except ExtractError, e:
if self.errorlevel > 1:
raise