Author serhiy.storchaka
Recipients dstufft, eric.araujo, mrabarnett, serhiy.storchaka
Date 2018-12-05.19:05:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1544036745.57.0.788709270274.issue34738@psf.upfronthosting.co.za>
In-reply-to
Content
The inconsistency is not just with the tarfile module, but with other method of creating ZIP archives.

The unix unzip command creates directories if needed, but I am not sure about other third-party utilities. Since all know ZIP creators creates entries for directories, I would not be surprised if there are ZIP readers that doesn't work without explicit entries for directories. Zipimport is an example of this.

Matthew mentioned other case. Empty directories currently are added to the TAR archive, but are omitted in the ZIP archive (unless you use an external zip tool). TAR archives are common on Unix, ZIP archives are common on Windows, and we can get different source distributions for Unix and Windows. You need to add a fake empty file to be sure that the directory will be added in the distribution. Some old DOS archives needed this trick, but the ZIP format supports empty directories.

The downside of adding entries for directories is that this increases the size of the archive. But the difference is pretty small.
History
Date User Action Args
2018-12-05 19:05:45serhiy.storchakasetrecipients: + serhiy.storchaka, eric.araujo, mrabarnett, dstufft
2018-12-05 19:05:45serhiy.storchakasetmessageid: <1544036745.57.0.788709270274.issue34738@psf.upfronthosting.co.za>
2018-12-05 19:05:45serhiy.storchakalinkissue34738 messages
2018-12-05 19:05:45serhiy.storchakacreate