Patch #1507247: tarfile.py: use current umask for intermediate
directories.
This commit is contained in:
parent
e498083b59
commit
d2e22903d3
|
@ -1630,19 +1630,7 @@ class TarFile(object):
|
||||||
# Create all upper directories.
|
# Create all upper directories.
|
||||||
upperdirs = os.path.dirname(targetpath)
|
upperdirs = os.path.dirname(targetpath)
|
||||||
if upperdirs and not os.path.exists(upperdirs):
|
if upperdirs and not os.path.exists(upperdirs):
|
||||||
ti = TarInfo()
|
os.makedirs(upperdirs)
|
||||||
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
|
|
||||||
|
|
||||||
if tarinfo.islnk() or tarinfo.issym():
|
if tarinfo.islnk() or tarinfo.issym():
|
||||||
self._dbg(1, "%s -> %s" % (tarinfo.name, tarinfo.linkname))
|
self._dbg(1, "%s -> %s" % (tarinfo.name, tarinfo.linkname))
|
||||||
|
|
|
@ -12,6 +12,9 @@ What's New in Python 2.6 alpha 1?
|
||||||
Core and builtins
|
Core and builtins
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
- Patch #1507247: tarfile.py: use current umask for intermediate
|
||||||
|
directories.
|
||||||
|
|
||||||
- Bug #1637022: Prefix AST symbols with _Py_.
|
- Bug #1637022: Prefix AST symbols with _Py_.
|
||||||
|
|
||||||
- Prevent seg fault on shutdown which could occur if an object
|
- Prevent seg fault on shutdown which could occur if an object
|
||||||
|
|
Loading…
Reference in New Issue