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 May 2, 2024
1 parent 35fb76f commit a3e93b4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/libsync/discovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1683,8 +1683,9 @@ void ProcessDirectoryJob::processFileFinalize(
}
}

if (_discoveryData->_syncOptions._vfs &&
item->_type == CSyncEnums::ItemTypeFile &&
if (item->_instruction == CSyncEnums::CSYNC_INSTRUCTION_NONE &&
_discoveryData->_syncOptions._vfs &&
(item->_type == CSyncEnums::ItemTypeFile || item->_type == CSyncEnums::ItemTypeDirectory) &&
!_discoveryData->_syncOptions._vfs->isPlaceHolderInSync(_discoveryData->_localDir + path._local)) {
item->_instruction = CSyncEnums::CSYNC_INSTRUCTION_UPDATE_VFS_METADATA;
}
Expand Down

0 comments on commit a3e93b4

Please sign in to comment.