]> xmof Git - DeDRM.git/commitdiff
Preserve filename encoding flag when fixing epub archive
authorjosdion <josdion@users.noreply.github.com>
Thu, 18 Feb 2021 10:38:19 +0000 (12:38 +0200)
committerjosdion <josdion@users.noreply.github.com>
Thu, 18 Feb 2021 10:38:19 +0000 (12:38 +0200)
DeDRM_plugin/zipfix.py

index b9451d691af414957251bf76008045809a8ae159..54469d8867dfd22b9e4dc0952b01490bfe6148fa 100644 (file)
@@ -153,6 +153,7 @@ class fixZip:
                 nzinfo.internal_attr=zinfo.internal_attr
                 nzinfo.external_attr=zinfo.external_attr
                 nzinfo.create_system=zinfo.create_system
+                nzinfo.flag_bits = zinfo.flag_bits & 0x800  # preserve UTF-8 flag
                 self.outzip.writestr(nzinfo,data)
 
         self.bzf.close()