diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2004-07-10 15:40:29 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2004-07-10 15:40:29 (GMT) |
commit | 55430213c55b74a256e0b7e3f35234249b574a9b (patch) | |
tree | 025bd6eb90a97ab3e7add63154c64c70e7bd1f6d /Lib/zipfile.py | |
parent | f9ea7c067a5278d02b28e567a99f850a136d29c8 (diff) | |
download | cpython-55430213c55b74a256e0b7e3f35234249b574a9b.zip cpython-55430213c55b74a256e0b7e3f35234249b574a9b.tar.gz cpython-55430213c55b74a256e0b7e3f35234249b574a9b.tar.bz2 |
[Bug #835415] AIX can return modes that are >65536, which causes an OverflowError. Fix from Albert Chin
Diffstat (limited to 'Lib/zipfile.py')
-rw-r--r-- | Lib/zipfile.py | 2 |
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: |