force dehydratation of lnk files when vfs metadata are wrong
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Fri, 3 Jan 2025 14:32:38 +0000 (15:32 +0100)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Fri, 3 Jan 2025 16:14:45 +0000 (16:14 +0000)
Close #7696

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
src/libsync/discovery.cpp

index e842f825408087b5b6c3205b7e3150033f68c636..800e9b4203e85a1d783d749860ba1ad997e2dcc5 100644 (file)
@@ -1672,7 +1672,8 @@ void ProcessDirectoryJob::processFileFinalize(
     if (_discoveryData->_syncOptions._vfs &&
         (item->_type == CSyncEnums::ItemTypeFile || item->_type == CSyncEnums::ItemTypeDirectory) &&
         item->_instruction == CSyncEnums::CSYNC_INSTRUCTION_NONE &&
-        FileSystem::isLnkFile((_discoveryData->_localDir + path._local))) {
+        FileSystem::isLnkFile((_discoveryData->_localDir + path._local)) &&
+        !_discoveryData->_syncOptions._vfs->isPlaceHolderInSync(_discoveryData->_localDir + path._local)) {
         item->_instruction = CSyncEnums::CSYNC_INSTRUCTION_SYNC;
         item->_direction = SyncFileItem::Down;
         item->_type = CSyncEnums::ItemTypeVirtualFileDehydration;