From 95e7720864f28e9b07003f4fec53d689f46d4e76 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Fri, 15 Feb 2019 08:18:58 +0100 Subject: [PATCH] Vfs: Fix folder dehydration requests on OSX #6977 Since the rename is triggered by the client process the folder watcher didn't pick up on it on OSX. This does not need to be merged into master. --- src/gui/socketapi.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gui/socketapi.cpp b/src/gui/socketapi.cpp index 0b9a9fa3ee..6ee993fc5d 100644 --- a/src/gui/socketapi.cpp +++ b/src/gui/socketapi.cpp @@ -665,13 +665,13 @@ void SocketApi::command_REPLACE_VIRTUAL_FILE(const QString &filesArg, SocketList qCWarning(lcSocketApi) << "Unable to rename " << file; } }); - continue; - } - SyncJournalFileRecord record; - if (!folder->journalDb()->getFileRecord(relativePath, &record) || !record.isValid()) - continue; - if (!FileSystem::rename(file, file + suffix)) { - qCWarning(lcSocketApi) << "Unable to rename " << file; + } else { + SyncJournalFileRecord record; + if (!folder->journalDb()->getFileRecord(relativePath, &record) || !record.isValid()) + continue; + if (!FileSystem::rename(file, file + suffix)) { + qCWarning(lcSocketApi) << "Unable to rename " << file; + } } folder->slotWatchedPathChanged(file); // make sure it is in the _localDiscoveryTracker list FolderMan::instance()->scheduleFolder(folder);