From 03c48643a2450c462acab245a8aa9d5ca0dc44c8 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Wed, 19 Jun 2024 19:05:13 +0200 Subject: [PATCH] only use VFS update instruction when sync engine would do nothing will ensure we do not erroneously use this instruction when we should not Signed-off-by: Matthieu Gallien --- src/libsync/discovery.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libsync/discovery.cpp b/src/libsync/discovery.cpp index ccfb0c25f982e..2cd501a291aa3 100644 --- a/src/libsync/discovery.cpp +++ b/src/libsync/discovery.cpp @@ -1681,8 +1681,9 @@ void ProcessDirectoryJob::processFileFinalize( } if (_discoveryData->_syncOptions._vfs && - item->_type == CSyncEnums::ItemTypeFile && - !_discoveryData->_syncOptions._vfs->isPlaceHolderInSync(_discoveryData->_localDir + path._local)) { + (item->_type == CSyncEnums::ItemTypeFile || item->_type == CSyncEnums::ItemTypeDirectory) && + item->_instruction == CSyncEnums::CSYNC_INSTRUCTION_NONE && + !_discoveryData->_syncOptions._vfs->isPlaceHolderInSync(_discoveryData->_localDir + path._local)) { item->_instruction = CSyncEnums::CSYNC_INSTRUCTION_UPDATE_VFS_METADATA; }