diff --git a/app/build.gradle b/app/build.gradle index b07f57f07..9a48dafc3 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -98,7 +98,7 @@ dependencies { implementation 'org.apache.commons:commons-csv:1.9.0' implementation 'com.jaredrummler:colorpicker:1.1.0' implementation 'com.github.invissvenska:NumberPickerPreference:1.0.4' - implementation 'net.lingala.zip4j:zip4j:2.9.1' + implementation 'net.lingala.zip4j:zip4j:2.10.0' // SpotBugs implementation 'io.wcm.tooling.spotbugs:io.wcm.tooling.spotbugs.annotations:1.0.0' diff --git a/app/src/main/java/protect/card_locker/importexport/MultiFormatImporter.java b/app/src/main/java/protect/card_locker/importexport/MultiFormatImporter.java index 58b0d34ee..362c14317 100644 --- a/app/src/main/java/protect/card_locker/importexport/MultiFormatImporter.java +++ b/app/src/main/java/protect/card_locker/importexport/MultiFormatImporter.java @@ -54,7 +54,12 @@ public class MultiFormatImporter { database.setTransactionSuccessful(); return new ImportExportResult(ImportExportResultType.Success); } catch (ZipException e) { - return new ImportExportResult(ImportExportResultType.BadPassword); + if (e.getType().equals(ZipException.Type.WRONG_PASSWORD)) { + return new ImportExportResult(ImportExportResultType.BadPassword); + } else { + Log.e(TAG, "Failed to import data", e); + error = e.toString(); + } } catch (Exception e) { Log.e(TAG, "Failed to import data", e); error = e.toString();