summaryrefslogtreecommitdiff
path: root/Lib/tarfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/tarfile.py')
-rw-r--r--Lib/tarfile.py14
1 files changed, 1 insertions, 13 deletions
diff --git a/Lib/tarfile.py b/Lib/tarfile.py
index 64e1f8835a..1685426fbf 100644
--- a/Lib/tarfile.py
+++ b/Lib/tarfile.py
@@ -1632,19 +1632,7 @@ class TarFile(object):
# Create all upper directories.
upperdirs = os.path.dirname(targetpath)
if upperdirs and not os.path.exists(upperdirs):
- ti = TarInfo()
- ti.name = upperdirs
- ti.type = DIRTYPE
- ti.mode = 0777
- ti.mtime = tarinfo.mtime
- ti.uid = tarinfo.uid
- ti.gid = tarinfo.gid
- ti.uname = tarinfo.uname
- ti.gname = tarinfo.gname
- try:
- self._extract_member(ti, ti.name)
- except:
- pass
+ os.makedirs(upperdirs)
if tarinfo.islnk() or tarinfo.issym():
self._dbg(1, "%s -> %s" % (tarinfo.name, tarinfo.linkname))