0
0
mirror of https://github.com/zeux/pugixml.git synced 2024-12-25 20:14:10 +08:00

scripts: Set file permissions when building .zip archive

It looks like zipfile module by default uses the permission mask 0,
which after unpacking on Unix-based systems leads to the files being
inaccessible.

We now explicitly set file mask to rw-r--r-- to match .tar.gz defaults.

Fixes #217.
This commit is contained in:
Arseny Kapoulkine 2018-07-22 18:52:29 -07:00
parent c12889f7cc
commit 699143c5d4

View File

@ -24,6 +24,7 @@ def write_zip(target, arcprefix, timestamp, sources):
info = zipfile.ZipInfo(path)
info.date_time = time.localtime(timestamp)
info.compress_type = zipfile.ZIP_DEFLATED
info.external_attr = 0644 << 16L
archive.writestr(info, data)
def write_tar(target, arcprefix, timestamp, sources, compression):