summaryrefslogtreecommitdiffstats
path: root/Lib/tarfile.py
diff options
context:
space:
mode:
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 a21f1ab..9ea92d0 100644
--- a/Lib/tarfile.py
+++ b/Lib/tarfile.py
@@ -2021,11 +2021,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 as e:
if self.errorlevel > 1:
raise