[Bug #835415] AIX can return modes that are >65536, which causes an OverflowError. Fix from Albert Chin

This commit is contained in:
Andrew M. Kuchling 2004-07-10 15:40:29 +00:00
parent f9ea7c067a
commit 55430213c5
1 changed files with 1 additions and 1 deletions

View File

@ -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: