[Pkg-owncloud-commits] [owncloud-client] 142/484: Folder::wipe: We need to shut the socket API down before removing the DB

Sandro Knauß hefee-guest at moszumanska.debian.org
Wed Dec 16 00:37:30 UTC 2015


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 84f1bdbc876d685b757e677772059b34205d33ec
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Fri Oct 23 17:24:45 2015 +0200

    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 53509ed..5d3db6a 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()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list