]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Improve zip64 limit error message (#95892)
authordmjohnsson23 <dmjohn235@gmail.com>
Wed, 30 Nov 2022 11:14:41 +0000 (04:14 -0700)
committerGitHub <noreply@github.com>
Wed, 30 Nov 2022 11:14:41 +0000 (16:44 +0530)
Lib/zipfile/__init__.py

index 8f834267b28c2eb1d9aafa3f9f797e0c4683987d..e1833dd1772d56e62c8c7f5202c70ea238658074 100644 (file)
@@ -1202,10 +1202,10 @@ class _ZipWriteFile(io.BufferedIOBase):
                 if not self._zip64:
                     if self._file_size > ZIP64_LIMIT:
                         raise RuntimeError(
-                            'File size unexpectedly exceeded ZIP64 limit')
+                            'File size too large, try using force_zip64')
                     if self._compress_size > ZIP64_LIMIT:
                         raise RuntimeError(
-                            'Compressed size unexpectedly exceeded ZIP64 limit')
+                            'Compressed size too large, try using force_zip64')
                 # Seek backwards and write file header (which will now include
                 # correct CRC and file sizes)