From 84f1bdbc876d685b757e677772059b34205d33ec Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Fri, 23 Oct 2015 17:24:45 +0200 Subject: [PATCH] Folder::wipe: We need to shut the socket API down before removing the DB Because the DB stays open and locked. Should fix #3824 --- src/gui/folder.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp index 53509edc8..5d3db6afe 100644 --- a/src/gui/folder.cpp +++ b/src/gui/folder.cpp @@ -28,6 +28,7 @@ #include "clientproxy.h" #include "syncengine.h" #include "syncrunfilelog.h" +#include "socketapi.h" #include "theme.h" #include "filesystem.h" #include "excludedfiles.h" @@ -771,6 +772,8 @@ void Folder::wipe() // Delete files that have been partially downloaded. slotDiscardDownloadProgress(); + //Unregister the socket API so it does not keep the .sync_journal file open + FolderMan::instance()->socketApi()->slotUnregisterPath(alias()); _journal.close(); // close the sync journal QFile file(stateDbFile); @@ -789,6 +792,8 @@ void Folder::wipe() QFile::remove( stateDbFile + "-shm" ); QFile::remove( stateDbFile + "-wal" ); QFile::remove( stateDbFile + "-journal" ); + + FolderMan::instance()->socketApi()->slotRegisterPath(alias()); } bool Folder::setIgnoredFiles() -- 2.30.2