From 3b7e95847fe2faff83d4e14c47cef510f70d3aaa Mon Sep 17 00:00:00 2001 From: alex-z Date: Fri, 19 Apr 2024 00:20:37 +0200 Subject: [PATCH] Bugfix. Migrate non-placeholder shortcuts to placeholder version. Signed-off-by: alex-z --- src/libsync/discovery.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libsync/discovery.cpp b/src/libsync/discovery.cpp index 646b7aaaeafc..4ac2c0b13768 100644 --- a/src/libsync/discovery.cpp +++ b/src/libsync/discovery.cpp @@ -1144,7 +1144,12 @@ void ProcessDirectoryJob::processFileAnalyzeLocalInfo( } else if (dbEntry._type == ItemTypeVirtualFileDehydration || localEntry.type == ItemTypeVirtualFileDehydration) { item->_direction = SyncFileItem::Down; item->_instruction = CSYNC_INSTRUCTION_SYNC; - item->_type = ItemTypeVirtualFileDehydration; + const auto pinState = _discoveryData->_syncOptions._vfs->pinState(path._local); + if (FileSystem::isLnkFile(path._local) && !_discoveryData->_syncOptions._vfs->pinState(path._local).isValid()) { + item->_type = ItemTypeVirtualFileDownload; + } else { + item->_type = ItemTypeVirtualFileDehydration; + } } else if (!serverModified && (dbEntry._inode != localEntry.inode || (localEntry.isMetadataMissing && item->_type == ItemTypeFile && !FileSystem::isLnkFile(item->_file))