@@ -75,7 +75,7 @@ def find_file_in_zip(zip_file):
7575
7676
7777def get_xml_from_archive (filename ):
78- with zipfile .ZipFile (filename ) as zf :
78+ with zipfile .ZipFile (filename , allowZip64 = True ) as zf :
7979 with zf .open (find_file_in_zip (zf )) as xml_file :
8080 xml_tree = ET .parse (xml_file )
8181
@@ -107,15 +107,15 @@ def save_into_archive(xml_tree, filename, new_filename=None):
107107
108108 # Extract to temp directory
109109 with temporary_directory () as temp_path :
110- with zipfile .ZipFile (filename ) as zf :
110+ with zipfile .ZipFile (filename , allowZip64 = True ) as zf :
111111 xml_file = find_file_in_zip (zf )
112112 zf .extractall (temp_path )
113113 # Write the new version of the file to the temp directory
114114 xml_tree .write (os .path .join (
115115 temp_path , xml_file ), encoding = "utf-8" , xml_declaration = True )
116116
117117 # 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 :
119119 build_archive_file (temp_path , new_archive )
120120
121121
0 commit comments