mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
normalize filenames in colpkg import
This commit is contained in:
parent
b04c2212b5
commit
fad6b244cd
1 changed files with 2 additions and 1 deletions
|
@ -7,6 +7,7 @@ import re
|
|||
import traceback
|
||||
import zipfile
|
||||
import json
|
||||
import unicodedata
|
||||
|
||||
from aqt.qt import *
|
||||
import anki.importing as importing
|
||||
|
@ -405,7 +406,7 @@ def _replaceWithApkg(mw, file, backup):
|
|||
mw.progress.update(ngettext("Processed %d media file",
|
||||
"Processed %d media files", n) % n)
|
||||
size = z.getinfo(cStr).file_size
|
||||
dest = os.path.join(d, file)
|
||||
dest = os.path.join(d, unicodedata.normalize("NFC", file))
|
||||
# if we have a matching file size
|
||||
if os.path.exists(dest) and size == os.stat(dest).st_size:
|
||||
continue
|
||||
|
|
Loading…
Reference in a new issue