From 7c6963589bd201010f7e676fd98394ea8e419f00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Kunz?= Date: Thu, 7 Nov 2024 12:06:14 +0100 Subject: [PATCH] KDESKTOP-1355 - initial fix --- .../remotefilesystemobserverworker.cpp | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/libsyncengine/update_detection/file_system_observer/remotefilesystemobserverworker.cpp b/src/libsyncengine/update_detection/file_system_observer/remotefilesystemobserverworker.cpp index e008a8133..34900ff9e 100644 --- a/src/libsyncengine/update_detection/file_system_observer/remotefilesystemobserverworker.cpp +++ b/src/libsyncengine/update_detection/file_system_observer/remotefilesystemobserverworker.cpp @@ -652,10 +652,34 @@ ExitCode RemoteFileSystemObserverWorker::processAction(ActionInfo &actionInfo, s break; // Item renamed - case ActionCode::actionCodeRename: + case ActionCode::actionCodeRename: { _syncPal->removeItemFromTmpBlacklist(actionInfo.snapshotItem.id(), ReplicaSide::Remote); + const bool exploreDir = + actionInfo.snapshotItem.type() == NodeType::Directory && !_snapshot->exists(actionInfo.snapshotItem.id()); _snapshot->updateItem(actionInfo.snapshotItem); + if (exploreDir) { + // Retrieve all children + const ExitCode exitCode = exploreDirectory(actionInfo.snapshotItem.id()); + + switch (exitCode) { + case ExitCode::NetworkError: + if (exitCause() == ExitCause::NetworkTimeout) { + _syncPal->addError(Error(errId(), exitCode, exitCause())); + } + break; + case ExitCode::LogicError: + if (exitCause() == ExitCause::FullListParsingError) { + _syncPal->addError(Error(_syncPal->syncDbId(), name(), exitCode, exitCause())); + } + break; + default: + break; + } + + if (exitCode != ExitCode::Ok) return exitCode; + } break; + } // Item edited case ActionCode::actionCodeEdit: