mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 23:28:14 +03:00
Folder::wipe: We need to shut the socket API down before removing the DB
Because the DB stays open and locked. Should fix #3824
This commit is contained in:
parent
c93defc82d
commit
84f1bdbc87
1 changed files with 5 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue