[Python-checkins] r53526 - in python/trunk: Lib/tarfile.py Misc/NEWS

lars.gustaebel python-checkins at python.org
Tue Jan 23 12:17:34 CET 2007


Author: lars.gustaebel
Date: Tue Jan 23 12:17:33 2007
New Revision: 53526

Modified:
   python/trunk/Lib/tarfile.py
   python/trunk/Misc/NEWS
Log:
Patch #1507247: tarfile.py: use current umask for intermediate
directories.



Modified: python/trunk/Lib/tarfile.py
==============================================================================
--- python/trunk/Lib/tarfile.py	(original)
+++ python/trunk/Lib/tarfile.py	Tue Jan 23 12:17:33 2007
@@ -1630,19 +1630,7 @@
         # 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))

Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS	(original)
+++ python/trunk/Misc/NEWS	Tue Jan 23 12:17:33 2007
@@ -12,6 +12,9 @@
 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


More information about the Python-checkins mailing list