From fad6b244cdf29c4aa3d5fcbfc6705f9a4c9ecd67 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 30 Sep 2017 19:29:21 +1000 Subject: [PATCH] normalize filenames in colpkg import --- aqt/importing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aqt/importing.py b/aqt/importing.py index 641c0bd04..499beb857 100644 --- a/aqt/importing.py +++ b/aqt/importing.py @@ -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