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:
parent
c12889f7cc
commit
699143c5d4
@ -24,6 +24,7 @@ def write_zip(target, arcprefix, timestamp, sources):
|
|||||||
info = zipfile.ZipInfo(path)
|
info = zipfile.ZipInfo(path)
|
||||||
info.date_time = time.localtime(timestamp)
|
info.date_time = time.localtime(timestamp)
|
||||||
info.compress_type = zipfile.ZIP_DEFLATED
|
info.compress_type = zipfile.ZIP_DEFLATED
|
||||||
|
info.external_attr = 0644 << 16L
|
||||||
archive.writestr(info, data)
|
archive.writestr(info, data)
|
||||||
|
|
||||||
def write_tar(target, arcprefix, timestamp, sources, compression):
|
def write_tar(target, arcprefix, timestamp, sources, compression):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user