Also prepend appName if id is empty
authorHannah von Reth <hannah.vonreth@owncloud.com>
Tue, 12 Jan 2021 15:37:46 +0000 (16:37 +0100)
committerMatthieu Gallien (Rebase PR Action) <matthieu_gallien@yahoo.fr>
Wed, 11 Aug 2021 17:13:44 +0000 (17:13 +0000)
src/libsync/creds/abstractcredentials.cpp

index 839bf3bbb39b50e013413a400f375b3cc36440d5..2f2b8b49b8c9d925fe04c5cb3226bacbd399df4e 100644 (file)
@@ -50,6 +50,7 @@ QString AbstractCredentials::keychainKey(const QString &url, const QString &user
     QString key = user + QLatin1Char(':') + u;
     if (!accountId.isEmpty()) {
         key += QLatin1Char(':') + accountId;
+    }
 #ifdef Q_OS_WIN
         // On Windows the credential keys aren't namespaced properly
         // by qtkeychain. To work around that we manually add namespacing
@@ -59,7 +60,6 @@ QString AbstractCredentials::keychainKey(const QString &url, const QString &user
         // migrated to new namespaced keys on windows for 2.4.
         key.prepend(QCoreApplication::applicationName() + "_");
 #endif
-    }
     return key;
 }
 } // namespace OCC