From d2e22903d353e8037b0e448a976052886f75f4df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20Gust=C3=A4bel?= Date: Tue, 23 Jan 2007 11:17:33 +0000 Subject: Patch #1507247: tarfile.py: use current umask for intermediate directories. --- Lib/tarfile.py | 14 +------------- Misc/NEWS | 3 +++ 2 files changed, 4 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)) diff --git a/Misc/NEWS b/Misc/NEWS index 5f4fdc1..8f7d17c 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -12,6 +12,9 @@ What's New in Python 2.6 alpha 1? Core and builtins ----------------- +- Patch #1507247: tarfile.py: use current umask for intermediate + directories. + - Bug #1637022: Prefix AST symbols with _Py_. - Prevent seg fault on shutdown which could occur if an object -- cgit v0.12