From fb0b89f5fa24206257201f55ee2afc896fc4c5fd Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Mon, 27 Jan 2025 18:56:48 +0100 Subject: [PATCH] fix wrong if condition Signed-off-by: Matthieu Gallien --- src/libsync/clientsideencryption.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsync/clientsideencryption.cpp b/src/libsync/clientsideencryption.cpp index d797991ad1cac..3b035f8b36d8f 100644 --- a/src/libsync/clientsideencryption.cpp +++ b/src/libsync/clientsideencryption.cpp @@ -1694,7 +1694,7 @@ void ClientSideEncryption::decryptPrivateKey(const AccountPtr &account, const QB _privateKey = privateKey; } else { const auto deprecatedSha1PrivateKey = EncryptionHelper::decryptPrivateKey(deprecatedSha1Password, key); - if (!privateKey.isEmpty()) { + if (!deprecatedSha1PrivateKey.isEmpty()) { _privateKey = deprecatedSha1PrivateKey; } else { _privateKey = EncryptionHelper::decryptPrivateKey(deprecatedPassword, key);