diff --git a/aqt/importing.py b/aqt/importing.py index 9e228b5b7..eed3008a4 100644 --- a/aqt/importing.py +++ b/aqt/importing.py @@ -315,6 +315,17 @@ Unable to import from a read-only file.""")) mw.reset() def setupApkgImport(mw, importer): + meta = None + try: + z = zipfile.ZipFile(importer.file) + meta = json.load(z.open("meta")) + if not meta['full']: + # add + return True + except: + # no meta attribute on broken file + pass + # if old file or full collection, we have to prompt user diag = askUserDialog(_("""\ Would you like to add to your collection, or replace it?"""), [_("Add"),