Skip to content

Commit 68e4bf5

Browse files
committed
Update the max folder version.
Add more logs during version check. Signed-off-by: Camila Ayres <[email protected]>
1 parent 71fcbff commit 68e4bf5

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/gui/folder.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,9 @@ class FolderDefinition
8585
* (version remains readable by 2.5.1)
8686
* Version 3: introduction of new windows vfs mode in 2.6.0
8787
* Version 5: available in oC client 4.0.0 and 4.2.0
88+
* Version 13: available in oC client 5.2.0 and 5.3.1
8889
*/
89-
static int maxSettingsVersion() { return 5; }
90+
static int maxSettingsVersion() { return 13; }
9091

9192
/// Ensure / as separator and trailing /.
9293
static QString prepareLocalPath(const QString &path);

src/gui/folderman.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -388,16 +388,19 @@ void FolderMan::backwardMigrationSettingsKeys(QStringList *deleteKeys, QStringLi
388388
auto processSubgroup = [&](const QString &name) {
389389
settings->beginGroup(name);
390390
const auto foldersVersion = settings->value(QLatin1String(settingsVersionC), 1).toInt();
391+
qCInfo(lcFolderMan) << "FolderDefinition::maxSettingsVersion:" << FolderDefinition::maxSettingsVersion();
391392
if (foldersVersion <= maxFoldersVersion) {
392393
for (const auto &folderAlias : settings->childGroups()) {
393394
settings->beginGroup(folderAlias);
394395
const auto folderVersion = settings->value(QLatin1String(settingsVersionC), 1).toInt();
395396
if (folderVersion > FolderDefinition::maxSettingsVersion()) {
397+
qCInfo(lcFolderMan) << "Ignoring folder:" << folderAlias << "version:" << folderVersion;
396398
ignoreKeys->append(settings->group());
397399
}
398400
settings->endGroup();
399401
}
400402
} else {
403+
qCInfo(lcFolderMan) << "Ignoring group:" << name << "version:" << foldersVersion;
401404
deleteKeys->append(settings->group());
402405
}
403406
settings->endGroup();

0 commit comments

Comments
 (0)