mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-24 21:35:47 +03:00
Alter sync engine to check new setting before displaying prompt
This commit is contained in:
parent
74a8c4aae8
commit
d8af949a6a
1 changed files with 4 additions and 1 deletions
|
@ -23,6 +23,7 @@
|
||||||
#include "syncfilestatus.h"
|
#include "syncfilestatus.h"
|
||||||
#include "csync_private.h"
|
#include "csync_private.h"
|
||||||
#include "filesystem.h"
|
#include "filesystem.h"
|
||||||
|
#include "configfile.h"
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
@ -824,7 +825,9 @@ void SyncEngine::slotDiscoveryJobFinished(int discoveryResult)
|
||||||
emit transmissionProgress(*_progressInfo);
|
emit transmissionProgress(*_progressInfo);
|
||||||
_progressInfo->start();
|
_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";
|
qDebug() << Q_FUNC_INFO << "All the files are going to be changed, asking the user";
|
||||||
bool cancel = false;
|
bool cancel = false;
|
||||||
emit aboutToRemoveAllFiles(_syncedItems.first()->_direction, &cancel);
|
emit aboutToRemoveAllFiles(_syncedItems.first()->_direction, &cancel);
|
||||||
|
|
Loading…
Reference in a new issue