From 2223b1702b425ce5b96d664595c3cd9d5bd9d086 Mon Sep 17 00:00:00 2001 From: Camila Ayres Date: Thu, 16 Jan 2025 19:56:14 +0100 Subject: [PATCH] Do not check for matching override server url when there are multiple servers. Signed-off-by: Camila Ayres --- src/gui/accountmanager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/accountmanager.cpp b/src/gui/accountmanager.cpp index 91703aa7b21a6..117c586c5c0f3 100644 --- a/src/gui/accountmanager.cpp +++ b/src/gui/accountmanager.cpp @@ -244,7 +244,7 @@ bool AccountManager::restoreFromLegacySettings() const auto cleanOverrideUrl = overrideUrl.endsWith('/') ? overrideUrl.chopped(1) : overrideUrl; qCInfo(lcAccountManager) << "Migrate: overrideUrl" << cleanOverrideUrl; - if (!cleanOverrideUrl.isEmpty()) { + if (!cleanOverrideUrl.isEmpty() && !Theme::instance()->multipleOverrideServers()) { oCSettings->beginGroup(QLatin1String(accountsC)); const auto accountsChildGroups = oCSettings->childGroups(); for (const auto &accountId : accountsChildGroups) { @@ -252,6 +252,7 @@ bool AccountManager::restoreFromLegacySettings() const auto oCUrl = oCSettings->value(QLatin1String(urlC)).toString(); const auto cleanOCUrl = oCUrl.endsWith('/') ? oCUrl.chopped(1) : oCUrl; + // in case the urls are equal reset the settings object to read from // the ownCloud settings object qCInfo(lcAccountManager) << "Migrate oC config if " << cleanOCUrl << " == " << cleanOverrideUrl << ":"