summaryrefslogtreecommitdiffstats
path: root/Lib/zipfile.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2009-05-24 19:47:22 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2009-05-24 19:47:22 (GMT)
commit70ccd167de68397889039a6470ae5fdf6f73e248 (patch)
tree4cad401e79a7a08b292c13e7261face5a0203843 /Lib/zipfile.py
parent403117aa606438427aa9f9dc72271d40bc0ba0b2 (diff)
downloadcpython-70ccd167de68397889039a6470ae5fdf6f73e248.zip
cpython-70ccd167de68397889039a6470ae5fdf6f73e248.tar.gz
cpython-70ccd167de68397889039a6470ae5fdf6f73e248.tar.bz2
Merged revisions 72893 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r72893 | martin.v.loewis | 2009-05-24 21:30:52 +0200 (So, 24 Mai 2009) | 3 lines Issue #6050: Don't fail extracting a directory from a zipfile if the directory already exists. ........
Diffstat (limited to 'Lib/zipfile.py')
-rw-r--r--Lib/zipfile.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/zipfile.py b/Lib/zipfile.py
index dab595b..5f2efb9 100644
--- a/Lib/zipfile.py
+++ b/Lib/zipfile.py
@@ -978,7 +978,8 @@ class ZipFile:
os.makedirs(upperdirs)
if member.filename[-1] == '/':
- os.mkdir(targetpath)
+ if not os.path.isdir(targetpath):
+ os.mkdir(targetpath)
return targetpath
source = self.open(member, pwd=pwd)