mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
#3394: zipfile.writestr doesn't set external attributes, so files are extracted mode 000 on Unix
This commit is contained in:
parent
8c664e8628
commit
5fdfa3e36d
3 changed files with 18 additions and 0 deletions
|
|
@ -1064,6 +1064,7 @@ class ZipFile:
|
|||
zinfo = ZipInfo(filename=zinfo_or_arcname,
|
||||
date_time=time.localtime(time.time())[:6])
|
||||
zinfo.compress_type = self.compression
|
||||
zinfo.external_attr = 0600 << 16
|
||||
else:
|
||||
zinfo = zinfo_or_arcname
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue