Another way to fix this.
authorallexzander <blackslayer4@gmail.com>
Wed, 31 Mar 2021 14:19:01 +0000 (17:19 +0300)
committerallexzander (Rebase PR Action) <allexzander@users.noreply.github.com>
Wed, 7 Apr 2021 09:08:02 +0000 (09:08 +0000)
Signed-off-by: allexzander <blackslayer4@gmail.com>
src/libsync/discovery.cpp
src/libsync/syncengine.cpp
src/libsync/vfs/cfapi/vfs_cfapi.cpp

index 47b4f2cf5517d5257545bc4fa85a106e148146ef..a24cb4d68184b4ae4c89f322d1d81d3c1116b006 100644 (file)
@@ -510,11 +510,13 @@ void ProcessDirectoryJob::processFileAnalyzeRemoteInfo(
             && item->_type == ItemTypeFile
             && opts._vfs->mode() != Vfs::Off
             && _pinState != PinState::AlwaysLocal
-#ifdef Q_OS_WIN
-            && !FileSystem::isLnkFile(path._server)
-#endif
             ) {
             item->_type = ItemTypeVirtualFile;
+#ifdef Q_OS_WIN
+            if(FileSystem::isLnkFile(path._server)) {
+                item->_type = ItemTypeVirtualFileDownload;
+            }
+#endif
             if (isVfsWithSuffix())
                 addVirtualFileSuffix(tmp_path._original);
         }
index 086da5cac056e02c8c590a8095cb08a901910e93..f6a23261a2a481d3ccec0b1b53dc93ae6dda2dd8 100644 (file)
@@ -345,11 +345,7 @@ void OCC::SyncEngine::slotItemDiscovered(const OCC::SyncFileItemPtr &item)
             rec._serverHasIgnoredFiles |= prev._serverHasIgnoredFiles;
 
             // Ensure it's a placeholder file on disk
-            if (item->_type == ItemTypeFile
-#ifdef Q_OS_WIN
-                    && !FileSystem::isLnkFile(filePath)
-#endif
-                    ) {
+            if (item->_type == ItemTypeFile) {
                 const auto result = _syncOptions._vfs->convertToPlaceholder(filePath, *item);
                 if (!result) {
                     item->_instruction = CSYNC_INSTRUCTION_ERROR;
index c9d05ce07e174f0220a6cfd1f3fdc3bc42bc0622..b5b2cb9e2dc4989aa92b9998f01cfe304a5ea72f 100644 (file)
@@ -196,7 +196,9 @@ bool VfsCfApi::statTypeVirtualFile(csync_file_stat_t *stat, void *statData)
         stat->type = ItemTypeVirtualFileDownload;
         return true;
     } else if (!isSparseFile && isUnpinned){
-        stat->type = ItemTypeVirtualFileDehydration;
+        if (!FileSystem::isLnkFile(stat->path)) {
+                stat->type = ItemTypeVirtualFileDehydration;
+        }
         return true;
     } else if (isSparseFile) {
         stat->type = ItemTypeVirtualFile;