diff options
author | Lars Gustäbel <lars@gustaebel.de> | 2007-01-23 11:17:33 (GMT) |
---|---|---|
committer | Lars Gustäbel <lars@gustaebel.de> | 2007-01-23 11:17:33 (GMT) |
commit | d2e22903d353e8037b0e448a976052886f75f4df (patch) | |
tree | c2747f9adc0f3c41e5127963aa8b32ad2220e961 /Lib/tarfile.py | |
parent | e498083b59d561294596f16e34166fa1692909ac (diff) | |
download | cpython-d2e22903d353e8037b0e448a976052886f75f4df.zip cpython-d2e22903d353e8037b0e448a976052886f75f4df.tar.gz cpython-d2e22903d353e8037b0e448a976052886f75f4df.tar.bz2 |
Patch #1507247: tarfile.py: use current umask for intermediate
directories.
Diffstat (limited to 'Lib/tarfile.py')
-rw-r--r-- | Lib/tarfile.py | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/Lib/tarfile.py b/Lib/tarfile.py index 1785144..47bd9a7 100644 --- a/Lib/tarfile.py +++ b/Lib/tarfile.py @@ -1630,19 +1630,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)) |