[Pkg-owncloud-commits] [owncloud-client] 18/470: Alter sync engine to check new setting before displaying prompt

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu May 12 16:24:39 UTC 2016


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 d8af949a6a9738765afe66b748ddedd92e8afc9c
Author: James Botting <james at bottswanamedia.info>
Date:   Sun Jan 24 18:45:29 2016 +0000

    Alter sync engine to check new setting before displaying prompt
---
 src/libsync/syncengine.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/libsync/syncengine.cpp b/src/libsync/syncengine.cpp
index cf99c63..4a7c738 100644
--- a/src/libsync/syncengine.cpp
+++ b/src/libsync/syncengine.cpp
@@ -23,6 +23,7 @@
 #include "syncfilestatus.h"
 #include "csync_private.h"
 #include "filesystem.h"
+#include "configfile.h"
 
 #ifdef Q_OS_WIN
 #include <windows.h>
@@ -824,7 +825,9 @@ void SyncEngine::slotDiscoveryJobFinished(int discoveryResult)
     emit transmissionProgress(*_progressInfo);
     _progressInfo->start();
 
-    if (!_hasNoneFiles && _hasRemoveFile) {
+    // Check the config file before displaying prompt in case it is disabled.
+    ConfigFile cfgFile;
+    if (!_hasNoneFiles && _hasRemoveFile && cfgFile.promptDeleteFiles()) {
         qDebug() << Q_FUNC_INFO << "All the files are going to be changed, asking the user";
         bool cancel = false;
         emit aboutToRemoveAllFiles(_syncedItems.first()->_direction, &cancel);

-- 
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