use proper item type when converting existing windows shortcuts
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Tue, 5 Nov 2024 15:29:53 +0000 (16:29 +0100)
committerMatthieu Gallien <matthieu.gallien@nextcloud.com>
Fri, 22 Nov 2024 08:50:08 +0000 (09:50 +0100)
we need to make shortcut files be proper virtual placeholder files

let the sync engine use the proper item type for that

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

index 7300a4c5f9a1ee1c32814c6635f46da59443104f..3fe2fb2d82e49adba63e628ef6e26a28d3faf89b 100644 (file)
@@ -1193,11 +1193,7 @@ void ProcessDirectoryJob::processFileAnalyzeLocalInfo(
                 item->_direction = SyncFileItem::Down;
                 item->_instruction = CSYNC_INSTRUCTION_SYNC;
                 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;
-                }
+                item->_type = ItemTypeVirtualFileDehydration;
             } else if (!serverModified
                 && (dbEntry._inode != localEntry.inode
                     || (localEntry.isMetadataMissing && item->_type == ItemTypeFile && !FileSystem::isLnkFile(item->_file))