Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue22219

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:python -mzipfile fails to add empty folders to created zip
Type:behaviorStage:resolved
Components:Library (Lib)Versions:Python 3.4, Python 3.5, Python 2.7
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To: serhiy.storchakaNosy List: Antony.Lee, python-dev, serhiy.storchaka
Priority:normalKeywords:patch

Created on2014-08-17 17:53 byAntony.Lee, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
zipfile_add_dirs.patchserhiy.storchaka,2014-09-24 10:35review
Messages (6)
msg225457 -(view)Author: Antony Lee (Antony.Lee)*Date: 2014-08-17 17:53
Compare$ mkdir foo; zip -q foo{,}; unzip -l foo.zipArchive:  foo.zip  Length      Date    Time    Name---------  ---------- -----   ----        0  2014-08-17 10:49   foo/---------                     -------        0                     1 fileand$ mkdir foo; python -mzipfile -c foo{.zip,}; unzip -l foo.zipArchive:  foo.zipwarning [foo.zip]:  zipfile is emptyA patch was posted by Ryan Wilson in related issue#22201.
msg225459 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2014-08-17 19:01
Directory entry should be added not only when directory is empty.See alsoissue20912.
msg225530 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2014-08-19 12:34
I think zipfile should add an entry for directories as zip tool does. Here is a patch. In additional it fixes zipfile -c for some corner cases (when arguments end with /, . or .. component).
msg226408 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2014-09-05 08:26
If there are no objections I'll commit the patch soon.
msg227437 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2014-09-24 10:35
Hmm, looks as I forgot to attach a patch.
msg228446 -(view)Author: Roundup Robot (python-dev)(Python triager)Date: 2014-10-04 10:56
New changeset911da1072099 by Serhiy Storchaka in branch '2.7':Issue#22219: The zipfile module CLI now adds entries for directorieshttps://hg.python.org/cpython/rev/911da1072099New changeset981d18930d6d by Serhiy Storchaka in branch '3.4':Issue#22219: The zipfile module CLI now adds entries for directorieshttps://hg.python.org/cpython/rev/981d18930d6dNew changesetd61d2e5a0956 by Serhiy Storchaka in branch 'default':Issue#22219: The zipfile module CLI now adds entries for directorieshttps://hg.python.org/cpython/rev/d61d2e5a0956
History
DateUserActionArgs
2022-04-11 14:58:07adminsetgithub: 66415
2014-10-04 11:53:05serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2014-10-04 10:56:22python-devsetnosy: +python-dev
messages: +msg228446
2014-09-24 10:35:20serhiy.storchakasetfiles: +zipfile_add_dirs.patch
keywords: +patch
messages: +msg227437
2014-09-05 08:26:26serhiy.storchakasetmessages: +msg226408
2014-08-19 17:40:45serhiy.storchakalinkissue22230 superseder
2014-08-19 12:34:22serhiy.storchakasetmessages: +msg225530
stage: needs patch -> patch review
2014-08-17 19:01:56serhiy.storchakasetmessages: +msg225459
2014-08-17 18:41:08serhiy.storchakasetversions: + Python 2.7
nosy: +serhiy.storchaka

assignee:serhiy.storchaka
type: behavior
stage: needs patch
2014-08-17 17:53:45Antony.Leecreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp