Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Brzezinski <adrian.brzezinski@eo.pl>2019-10-17 15:45:38 +0300
committerCamila San <hello@camila.codes>2019-11-05 00:48:42 +0300
commit5adbc01ef138efd252c5c8c340f57dae0b34d8b9 (patch)
treefdf87d3e8c188cdf09cb7a07d7edf6de525ea670
parentc4a04bfd05b053726b06c83800f0c5a759b300b2 (diff)
* fix for issue no. 1351v2.6.1
-rw-r--r--src/gui/folder.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp
index c8d0e645b..c6d78b4bb 100644
--- a/src/gui/folder.cpp
+++ b/src/gui/folder.cpp
@@ -902,13 +902,19 @@ void Folder::slotItemCompleted(const SyncFileItemPtr &item)
}
// add new directories or remove gone away dirs to the watcher
- if (item->isDirectory() && item->_instruction == CSYNC_INSTRUCTION_NEW) {
- if (_folderWatcher)
- _folderWatcher->addPath(path() + item->_file);
- }
- if (item->isDirectory() && item->_instruction == CSYNC_INSTRUCTION_REMOVE) {
- if (_folderWatcher)
- _folderWatcher->removePath(path() + item->_file);
+ if (_folderWatcher && item->isDirectory()) {
+ switch (item->_instruction) {
+ case CSYNC_INSTRUCTION_NEW:
+ _folderWatcher->addPath(path() + item->_file);
+ break;
+ case CSYNC_INSTRUCTION_REMOVE:
+ _folderWatcher->removePath(path() + item->_file);
+ break;
+ case CSYNC_INSTRUCTION_RENAME:
+ _folderWatcher->removePath(path() + item->_file);
+ _folderWatcher->addPath(path() + item->destination());
+ break;
+ }
}
// Success and failure of sync items adjust what the next sync is