cpython: de5582c569ff (original) (raw)

Mercurial > cpython

changeset 99287:de5582c569ff 2.7

Issue #25624: ZipFile now always writes a ZIP_STORED header for directory entries. Patch by Dingyuan Wang. [#25624]

Serhiy Storchaka storchaka@gmail.com
date Sun, 22 Nov 2015 14:56:22 +0200
parents c33e4881721f
children d452cf840e5b
files Lib/test/test_shutil.py Lib/zipfile.py Misc/ACKS Misc/NEWS
diffstat 4 files changed, 30 insertions(+), 1 deletions(-)[+] [-] Lib/test/test_shutil.py 23 Lib/zipfile.py 4 Misc/ACKS 1 Misc/NEWS 3

line wrap: on

line diff

--- a/Lib/test/test_shutil.py +++ b/Lib/test/test_shutil.py @@ -511,6 +511,29 @@ class TestShutil(unittest.TestCase): names2 = zf.namelist() self.assertEqual(sorted(names), sorted(names2))

+

+

+ def test_make_archive(self): tmpdir = self.mkdtemp() base_name = os.path.join(tmpdir, 'archive')

--- a/Lib/zipfile.py +++ b/Lib/zipfile.py @@ -1134,7 +1134,9 @@ class ZipFile(object): arcname += '/' zinfo = ZipInfo(arcname, date_time) zinfo.external_attr = (st[0] & 0xFFFF) << 16L # Unix attributes

--- a/Misc/ACKS +++ b/Misc/ACKS @@ -1443,6 +1443,7 @@ Richard Walker Larry Wall Kevin Walzer Rodrigo Steinmuller Wanderley +Dingyuan Wang Ke Wang Greg Ward Tom Wardill

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -13,6 +13,9 @@ Core and Builtins Library ------- +- Issue #25624: ZipFile now always writes a ZIP_STORED header for directory