From 09cfbfaa199f914d087a6dd6b4489e97e73a9165 Mon Sep 17 00:00:00 2001 From: Douglas Lam Date: Mon, 7 Aug 2017 11:44:46 -0700 Subject: [PATCH] Enabling Zip64 Extension to support zipfile >- 2GB. --- tableaudocumentapi/xfile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tableaudocumentapi/xfile.py b/tableaudocumentapi/xfile.py index 8e213ab..c3e1348 100644 --- a/tableaudocumentapi/xfile.py +++ b/tableaudocumentapi/xfile.py @@ -75,7 +75,7 @@ def find_file_in_zip(zip_file): def get_xml_from_archive(filename): - with zipfile.ZipFile(filename) as zf: + with zipfile.ZipFile(filename, allowZip64=True) as zf: with zf.open(find_file_in_zip(zf)) as xml_file: xml_tree = ET.parse(xml_file) @@ -107,7 +107,7 @@ def save_into_archive(xml_tree, filename, new_filename=None): # Extract to temp directory with temporary_directory() as temp_path: - with zipfile.ZipFile(filename) as zf: + with zipfile.ZipFile(filename, allowZip64=True) as zf: xml_file = find_file_in_zip(zf) zf.extractall(temp_path) # Write the new version of the file to the temp directory @@ -115,7 +115,7 @@ def save_into_archive(xml_tree, filename, new_filename=None): temp_path, xml_file), encoding="utf-8", xml_declaration=True) # Write the new archive with the contents of the temp folder - with zipfile.ZipFile(new_filename, "w", compression=zipfile.ZIP_DEFLATED) as new_archive: + with zipfile.ZipFile(new_filename, "w", compression=zipfile.ZIP_DEFLATED, allowZip64=True) as new_archive: build_archive_file(temp_path, new_archive) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy