From 67ed54671b5f3be9520089f85d9e2e7aebc037f6 Mon Sep 17 00:00:00 2001 From: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com> Date: Thu, 26 Sep 2019 17:47:01 +0200 Subject: [PATCH] Adapted for cmd version and added migration step for config file Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com> --- src/cmd/cmd.cpp | 2 +- src/gui/folderman.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/cmd/cmd.cpp b/src/cmd/cmd.cpp index 5e3517af2..47876b231 100644 --- a/src/cmd/cmd.cpp +++ b/src/cmd/cmd.cpp @@ -499,7 +499,7 @@ restart_sync: } Cmd cmd; - QString dbPath = options.source_dir + SyncJournalDb::makeDbName(options.source_dir, credentialFreeUrl, folder, user); + QString dbPath = options.source_dir + SyncJournalDb::makeDbName(credentialFreeUrl, folder, user); SyncJournalDb db(dbPath); if (!selectiveSyncList.empty()) { diff --git a/src/gui/folderman.cpp b/src/gui/folderman.cpp index ec708d9b7..2a74d9ac0 100644 --- a/src/gui/folderman.cpp +++ b/src/gui/folderman.cpp @@ -210,6 +210,11 @@ void FolderMan::setupFoldersHelper(QSettings &settings, AccountStatePtr account, folderDefinition.journalPath = defaultJournalPath; } + // Migration #2: journalPath now in DataAppDir, not root of local tree (cross-platform persistent user roaming files) + if (folderDefinition.journalPath.at(0) == QChar('.')) { + folderDefinition.journalPath = defaultJournalPath; + } + // Migration: ._ files sometimes don't work // So if the configured journalPath is the default one ("._sync_*.db") // but the current default doesn't have the underscore, switch to the