summaryrefslogtreecommitdiffstats
path: root/Lib/zipfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/zipfile.py')
-rw-r--r--Lib/zipfile.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/zipfile.py b/Lib/zipfile.py
index b1943c1..4f200c2 100644
--- a/Lib/zipfile.py
+++ b/Lib/zipfile.py
@@ -396,7 +396,7 @@ class ZipFile:
zinfo = ZipInfo(filename, date_time)
else:
zinfo = ZipInfo(arcname, date_time)
- zinfo.external_attr = st[0] << 16L # Unix attributes
+ zinfo.external_attr = (st[0] & 0xFFFF) << 16L # Unix attributes
if compress_type is None:
zinfo.compress_type = self.compression
else: