diff --git a/aqt/importing.py b/aqt/importing.py index 3410f4c63..0639215ec 100644 --- a/aqt/importing.py +++ b/aqt/importing.py @@ -281,7 +281,7 @@ def importFile(mw, file): except Exception, e: msg = unicode(e) if msg == "unknownFormat": - if ext == ".anki2": + if file.endswith(".anki2"): showWarning(_("""\ .anki2 files are not designed for importing. If you're trying to restore from a \ backup, please see the 'Backups' section of the user manual."""))