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
90c24c42
Kaydet (Commit)
90c24c42
authored
Eki 04, 2014
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Issue #22219: The zipfile module CLI now adds entries for directories
(including empty directories) in ZIP file.
üst
84bf989c
518e71b1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
zipfile.py
Lib/zipfile.py
+9
-2
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/zipfile.py
Dosyayı görüntüle @
90c24c42
...
@@ -1790,14 +1790,21 @@ def main(args = None):
...
@@ -1790,14 +1790,21 @@ def main(args = None):
if
os
.
path
.
isfile
(
path
):
if
os
.
path
.
isfile
(
path
):
zf
.
write
(
path
,
zippath
,
ZIP_DEFLATED
)
zf
.
write
(
path
,
zippath
,
ZIP_DEFLATED
)
elif
os
.
path
.
isdir
(
path
):
elif
os
.
path
.
isdir
(
path
):
if
zippath
:
zf
.
write
(
path
,
zippath
)
for
nm
in
os
.
listdir
(
path
):
for
nm
in
os
.
listdir
(
path
):
addToZip
(
zf
,
addToZip
(
zf
,
os
.
path
.
join
(
path
,
nm
),
os
.
path
.
join
(
zippath
,
nm
))
os
.
path
.
join
(
path
,
nm
),
os
.
path
.
join
(
zippath
,
nm
))
# else: ignore
# else: ignore
with
ZipFile
(
args
[
1
],
'w'
)
as
zf
:
with
ZipFile
(
args
[
1
],
'w'
)
as
zf
:
for
src
in
args
[
2
:]:
for
path
in
args
[
2
:]:
addToZip
(
zf
,
src
,
os
.
path
.
basename
(
src
))
zippath
=
os
.
path
.
basename
(
path
)
if
not
zippath
:
zippath
=
os
.
path
.
basename
(
os
.
path
.
dirname
(
path
))
if
zippath
in
(
''
,
os
.
curdir
,
os
.
pardir
):
zippath
=
''
addToZip
(
zf
,
path
,
zippath
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
main
()
main
()
Misc/NEWS
Dosyayı görüntüle @
90c24c42
...
@@ -159,6 +159,9 @@ Core and Builtins
...
@@ -159,6 +159,9 @@ Core and Builtins
Library
Library
-------
-------
-
Issue
#
22219
:
The
zipfile
module
CLI
now
adds
entries
for
directories
(
including
empty
directories
)
in
ZIP
file
.
-
Issue
#
22449
:
In
the
ssl
.
SSLContext
.
load_default_certs
,
consult
the
-
Issue
#
22449
:
In
the
ssl
.
SSLContext
.
load_default_certs
,
consult
the
enviromental
variables
SSL_CERT_DIR
and
SSL_CERT_FILE
on
Windows
.
enviromental
variables
SSL_CERT_DIR
and
SSL_CERT_FILE
on
Windows
.
...
...
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