fix: Show wrong password error on V4 migration as well

Check if the sqlite error "file is not a database" is included the error message and ignore the custom app error substrings.
This commit is contained in:
Alex Jbanca 2023-12-06 12:22:11 +02:00 committed by Alex Jbanca
parent a8b034a35b
commit 50bad5539b
1 changed files with 1 additions and 1 deletions

View File

@ -138,7 +138,7 @@ Item {
if (error) {
if (!root.startupStore.selectedLoginAccount.keycardCreatedAccount) {
// SQLITE_NOTADB: "file is not a database"
if (error === "file is not a database" || error.startsWith("failed to set ")) {
if (error.includes("file is not a database")) {
txtPassword.validationError = qsTr("Password incorrect")
} else {
txtPassword.validationError = qsTr("Login failed: %1").arg(error.toUpperCase())