[server] portable dump format supports now ZIP64 extensions by default (closes #1912535)
ZIP files can use the ZIP64 extensions when the zipfile is larger than 2 GB.
zipfile will raise an exception when the ZIP file would require ZIP64 extensions.
Note: ZIP64 extensions are disabled by default in stdlib because the default
zip and unzip commands on Unix (the InfoZIP utilities) don’t support these
extensions.
--- a/server/sources/native.py Tue Sep 13 17:35:14 2011 +0200
+++ b/server/sources/native.py Tue Sep 13 17:42:22 2011 +0200
@@ -1651,7 +1651,7 @@
return self._source.get_connection()
def backup(self, backupfile):
- archive=zipfile.ZipFile(backupfile, 'w')
+ archive=zipfile.ZipFile(backupfile, 'w', allowZip64=True)
self.cnx = self.get_connection()
try:
self.cursor = self.cnx.cursor()
@@ -1747,7 +1747,7 @@
return dumps((name, columns, rows), pickle.HIGHEST_PROTOCOL)
def restore(self, backupfile):
- archive = zipfile.ZipFile(backupfile, 'r')
+ archive = zipfile.ZipFile(backupfile, 'r', allowZip64=True)
self.cnx = self.get_connection()
self.cursor = self.cnx.cursor()
sequences, tables, table_chunks = self.read_metadata(archive, backupfile)