Skip to content

Commit

Permalink
Update the max account version.
Browse files Browse the repository at this point in the history
Add more logs.

Signed-off-by: Camila Ayres <hello@camilasan.com>
  • Loading branch information
camilasan committed Jan 29, 2025
1 parent 68e4bf5 commit 0e19db7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/gui/accountmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ constexpr auto unbrandedRelativeConfigLocationC = "/Nextcloud/nextcloud.cfg";
constexpr auto unbrandedCfgFileNameC = "nextcloud.cfg";

// The maximum versions that this client can read
constexpr auto maxAccountsVersion = 2;
constexpr auto maxAccountVersion = 1;
constexpr auto maxAccountsVersion = 13;
constexpr auto maxAccountVersion = 13;

constexpr auto serverHasValidSubscriptionC = "serverHasValidSubscription";
}
Expand Down Expand Up @@ -149,6 +149,9 @@ void AccountManager::backwardMigrationSettingsKeys(QStringList *deleteKeys, QStr
const auto settings = ConfigFile::settingsWithGroup(QLatin1String(accountsC));
const auto accountsVersion = settings->value(QLatin1String(versionC)).toInt();

qCInfo(lcAccountManager) << "Checking for accounts versions.";
qCInfo(lcAccountManager) << "Config accounts version:" << accountsVersion;
qCInfo(lcAccountManager) << "Max accounts Version is set to:" << maxAccountsVersion;
if (accountsVersion <= maxAccountsVersion) {
const auto settingsChildGroups = settings->childGroups();
for (const auto &accountId : settingsChildGroups) {
Expand All @@ -157,6 +160,7 @@ void AccountManager::backwardMigrationSettingsKeys(QStringList *deleteKeys, QStr

if (accountVersion > maxAccountVersion) {
ignoreKeys->append(settings->group());
qCInfo(lcAccountManager) << "Ignoring account" << accountId << "because of version" << accountVersion;
}
settings->endGroup();
}
Expand Down

0 comments on commit 0e19db7

Please sign in to comment.