Skip to content

Commit ee3b753

Browse files
committed
1 parent e926a95 commit ee3b753

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

Lib/test/test_zipfile/test_core.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1366,7 +1366,15 @@ class ComparableZipInfo:
13661366
keys = [i for i in zipfile.ZipInfo.__slots__ if not i.startswith('_')]
13671367

13681368
def __new__(cls, zinfo):
1369-
return {i: getattr(zinfo, i) for i in cls.keys}
1369+
attrs = {i: getattr(zinfo, i) for i in cls.keys}
1370+
1371+
# Since patch gh-84353, the _MASK_UTF_FILENAME (0x800) bit may be
1372+
# changed when writing to the end record depending on whether filename
1373+
# can be encoded with ascii or cp437. Skip checking this bit by
1374+
# pretending it's always set.
1375+
attrs['flag_bits'] |= 0x800
1376+
1377+
return attrs
13701378

13711379
_struct_pack = struct.pack
13721380

0 commit comments

Comments
 (0)