Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
0b09c42f
Kaydet (Commit)
0b09c42f
authored
May 24, 2009
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #6050: Don't fail extracting a directory from a zipfile if
the directory already exists.
üst
53b578eb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
test_zipfile.py
Lib/test/test_zipfile.py
+5
-0
zipfile.py
Lib/zipfile.py
+2
-1
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/test/test_zipfile.py
Dosyayı görüntüle @
0b09c42f
...
@@ -1023,6 +1023,11 @@ class TestWithDirectory(unittest.TestCase):
...
@@ -1023,6 +1023,11 @@ class TestWithDirectory(unittest.TestCase):
self
.
assertTrue
(
os
.
path
.
isdir
(
os
.
path
.
join
(
TESTFN2
,
"a"
,
"b"
)))
self
.
assertTrue
(
os
.
path
.
isdir
(
os
.
path
.
join
(
TESTFN2
,
"a"
,
"b"
)))
self
.
assertTrue
(
os
.
path
.
exists
(
os
.
path
.
join
(
TESTFN2
,
"a"
,
"b"
,
"c"
)))
self
.
assertTrue
(
os
.
path
.
exists
(
os
.
path
.
join
(
TESTFN2
,
"a"
,
"b"
,
"c"
)))
def
test_bug_6050
(
self
):
# Extraction should succeed if directories already exist
os
.
mkdir
(
os
.
path
.
join
(
TESTFN2
,
"a"
))
self
.
testExtractDir
()
def
testStoreDir
(
self
):
def
testStoreDir
(
self
):
os
.
mkdir
(
os
.
path
.
join
(
TESTFN2
,
"x"
))
os
.
mkdir
(
os
.
path
.
join
(
TESTFN2
,
"x"
))
zipf
=
zipfile
.
ZipFile
(
TESTFN
,
"w"
)
zipf
=
zipfile
.
ZipFile
(
TESTFN
,
"w"
)
...
...
Lib/zipfile.py
Dosyayı görüntüle @
0b09c42f
...
@@ -971,7 +971,8 @@ class ZipFile:
...
@@ -971,7 +971,8 @@ class ZipFile:
os
.
makedirs
(
upperdirs
)
os
.
makedirs
(
upperdirs
)
if
member
.
filename
[
-
1
]
==
'/'
:
if
member
.
filename
[
-
1
]
==
'/'
:
os
.
mkdir
(
targetpath
)
if
not
os
.
path
.
isdir
(
targetpath
):
os
.
mkdir
(
targetpath
)
return
targetpath
return
targetpath
source
=
self
.
open
(
member
,
pwd
=
pwd
)
source
=
self
.
open
(
member
,
pwd
=
pwd
)
...
...
Misc/NEWS
Dosyayı görüntüle @
0b09c42f
...
@@ -302,6 +302,9 @@ Core and Builtins
...
@@ -302,6 +302,9 @@ Core and Builtins
Library
Library
-------
-------
- Issue #6050: Don't fail extracting a directory from a zipfile if
the directory already exists.
- Issue #5311: bdist_msi can now build packages that do not depend on a
- Issue #5311: bdist_msi can now build packages that do not depend on a
specific Python version.
specific Python version.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment