Skip to content

Commit

Permalink
as a last resort, try to update VFS metadata of folders when discovered
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
mgallien committed Aug 20, 2024
1 parent 5481974 commit 3b8d021
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libsync/discovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1673,7 +1673,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;
Expand Down

0 comments on commit 3b8d021

Please sign in to comment.