From ffd79d5fe4700722bbe9a7a5d028f4e5a4771e7e Mon Sep 17 00:00:00 2001 From: josdion Date: Thu, 18 Feb 2021 12:38:19 +0200 Subject: [PATCH] Preserve filename encoding flag when fixing epub archive --- DeDRM_plugin/zipfix.py | 1 + 1 file changed, 1 insertion(+) diff --git a/DeDRM_plugin/zipfix.py b/DeDRM_plugin/zipfix.py index b9451d6..54469d8 100644 --- a/DeDRM_plugin/zipfix.py +++ b/DeDRM_plugin/zipfix.py @@ -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()