You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/serhiy-storchaka'closed_at=<Date2016-10-23.16:16:23.824>created_at=<Date2016-10-20.13:07:50.407>labels= ['3.7', 'type-bug', 'library']
title="shutil.make_archive (xxx, zip, root_dir) is adding './' entry to archive which is wrong"updated_at=<Date2019-02-08.09:35:14.035>user='https://bugs.python.org/bialix'
Running shutil.make_archive('a', 'zip', 'subdir') is created wrong and not really needed entry "./" which is visible in zipfile.ZipFile.namelist():
['./', 'foo/', 'hello.txt', 'foo/bar.txt']
This "./" affects some (windows) unzip tools which produces warnings/errors about this incorrect entry.
This error present in Python 2.7.11-12 and Python 3.4.4 (those I have installed right now). But Python 3.3.5 does not have it, maybe because it omits entries for directories at all.
I've attached a simple script which illustrates problem. Tested on Windows with mentioned python versions.
Can't reproduce on Centos 7.2 with Python 3.4.3 and 2.7.5.
I suppose it could be realted to the change I spot in latest 2.7 changelog:
Issue bpo-24982: shutil.make_archive() with the "zip" format now adds entries
for directories (including empty directories) in ZIP file.
Misc/NEWS
so that it is managed by towncrier #552Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: