bop-40172: fixed old zip filename corruption
This commit is contained in:
parent
77c623ba3d
commit
9ff84c7e33
|
@ -454,7 +454,7 @@ class ZipInfo (object):
|
|||
|
||||
def _encodeFilenameFlags(self):
|
||||
try:
|
||||
return self.filename.encode('ascii'), self.flag_bits
|
||||
return self.filename.encode('cp437'), self.flag_bits
|
||||
except UnicodeEncodeError:
|
||||
return self.filename.encode('utf-8'), self.flag_bits | 0x800
|
||||
|
||||
|
|
Loading…
Reference in New Issue