mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Fix ValueError when exported files have wrong mtime (#1666)
* Fix ValueError when exported files have wrong mtime Set the `strict_timestamps` argument to `False`, so the media files which have a wrong mtime can be normally added to the zipfile. * Update CONTRIBUTORS (ankitects#1666) * Reformat exporting.py
This commit is contained in:
parent
94846dc4e3
commit
d29a0beb40
2 changed files with 4 additions and 1 deletions
|
@ -94,6 +94,7 @@ Spooghetti420 <github.com/spooghetti420>
|
|||
Danish Prakash <github.com/danishprakash>
|
||||
Araceli Yanez <github.com/aracelix>
|
||||
Sam Bradshaw <samjr.bradshaw@gmail.com>
|
||||
gnnoh <gerongfenh@gmail.com>
|
||||
|
||||
********************
|
||||
|
||||
|
|
|
@ -340,7 +340,9 @@ class AnkiPackageExporter(AnkiExporter):
|
|||
|
||||
def exportInto(self, path: str) -> None:
|
||||
# open a zip file
|
||||
z = zipfile.ZipFile(path, "w", zipfile.ZIP_DEFLATED, allowZip64=True)
|
||||
z = zipfile.ZipFile(
|
||||
path, "w", zipfile.ZIP_DEFLATED, allowZip64=True, strict_timestamps=False
|
||||
)
|
||||
media = self.doExport(z, path)
|
||||
# media map
|
||||
z.writestr("media", json.dumps(media))
|
||||
|
|
Loading…
Reference in a new issue