diff options
author | Hannah von Reth <hannah.vonreth@owncloud.com> | 2021-09-23 12:46:53 +0300 |
---|---|---|
committer | Hannah von Reth <vonreth@kde.org> | 2021-09-28 18:26:47 +0300 |
commit | 367a480676abfc5861987e25a6a87ba303767707 (patch) | |
tree | 6e5b7a36aab465b89b0aeac9d6dacec2f700a93c /src | |
parent | 9226f7e165747fc6c0496f81beb4b666b3a8188c (diff) |
Prevent recration of db after removal
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/folder.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp index 55f0eb5d0..08fcc6496 100644 --- a/src/gui/folder.cpp +++ b/src/gui/folder.cpp @@ -793,6 +793,13 @@ void Folder::slotTerminateSync() void Folder::wipeForRemoval() { + // prevent interaction with the db etc + _vfsIsReady = false; + + // stop reacting to changes + // especially the upcoming deletion of the db + _folderWatcher.reset(); + // Delete files that have been partially downloaded. slotDiscardDownloadProgress(); @@ -806,7 +813,7 @@ void Folder::wipeForRemoval() QFile file(stateDbFile); if (file.exists()) { if (!file.remove()) { - qCWarning(lcFolder) << "Failed to remove existing csync StateDB " << stateDbFile; + qCCritical(lcFolder) << "Failed to remove existing csync StateDB " << stateDbFile; } else { qCInfo(lcFolder) << "wipe: Removed csync StateDB " << stateDbFile; } |