Skip to content

Commit

Permalink
Do not check for matching override server url when there are multiple…
Browse files Browse the repository at this point in the history
… servers.

Signed-off-by: Camila Ayres <[email protected]>
  • Loading branch information
camilasan committed Jan 29, 2025
1 parent 9252768 commit a7dea6b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gui/accountmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,15 @@ 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) {
oCSettings->beginGroup(accountId);
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 << ":"
Expand Down

0 comments on commit a7dea6b

Please sign in to comment.