@@ -75,7 +75,7 @@ def find_file_in_zip(zip_file):
75
75
76
76
77
77
def get_xml_from_archive (filename ):
78
- with zipfile .ZipFile (filename ) as zf :
78
+ with zipfile .ZipFile (filename , allowZip64 = True ) as zf :
79
79
with zf .open (find_file_in_zip (zf )) as xml_file :
80
80
xml_tree = ET .parse (xml_file )
81
81
@@ -107,15 +107,15 @@ def save_into_archive(xml_tree, filename, new_filename=None):
107
107
108
108
# Extract to temp directory
109
109
with temporary_directory () as temp_path :
110
- with zipfile .ZipFile (filename ) as zf :
110
+ with zipfile .ZipFile (filename , allowZip64 = True ) as zf :
111
111
xml_file = find_file_in_zip (zf )
112
112
zf .extractall (temp_path )
113
113
# Write the new version of the file to the temp directory
114
114
xml_tree .write (os .path .join (
115
115
temp_path , xml_file ), encoding = "utf-8" , xml_declaration = True )
116
116
117
117
# Write the new archive with the contents of the temp folder
118
- with zipfile .ZipFile (new_filename , "w" , compression = zipfile .ZIP_DEFLATED ) as new_archive :
118
+ with zipfile .ZipFile (new_filename , "w" , compression = zipfile .ZIP_DEFLATED , allowZip64 = True ) as new_archive :
119
119
build_archive_file (temp_path , new_archive )
120
120
121
121
0 commit comments