as a last resort, try to update VFS metadata of folders when discovered

when doing local discovery, it is possible that files or folders may be
discovered with VFS metadata not up to date (i.e. placeholder file not
set in sync)

in such case, generate a propagation instruction to set them in sync

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
Matthieu Gallien 2024-04-30 13:33:58 +02:00
parent da920f6d4e
commit 7a6691f6e0
No known key found for this signature in database
GPG key ID: 7D0F74F05C22F553

View file

@ -1719,7 +1719,7 @@ void ProcessDirectoryJob::processFileFinalize(
}
if (_discoveryData->_syncOptions._vfs &&
item->_type == CSyncEnums::ItemTypeFile &&
(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;