aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2018-07-22 18:52:29 -0700
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2018-07-22 18:57:10 -0700
commit699143c5d4310b3ed63ee517b16202f14ad9ceb1 (patch)
treebf82d0dfec61d1e17b4e883177ffa3aa4d64adf1
parentc12889f7ccee3a91754f12a4f5b2bf5eb87acabd (diff)
downloadpugixml-699143c5d4310b3ed63ee517b16202f14ad9ceb1.zip
pugixml-699143c5d4310b3ed63ee517b16202f14ad9ceb1.tar.gz
pugixml-699143c5d4310b3ed63ee517b16202f14ad9ceb1.tar.bz2
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.
-rw-r--r--scripts/archive.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/archive.py b/scripts/archive.py
index dbe54d9..d102d05 100644
--- a/scripts/archive.py
+++ b/scripts/archive.py
@@ -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):