From: allexzander Date: Thu, 1 Apr 2021 13:09:26 +0000 (+0300) Subject: Treat .lnk files as normal files without hydrating them or creating a placeholder. X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~21^2~275^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=13f4bb541d0a675daf347c352cf758ef8a8db0c6;p=nextcloud-desktop.git Treat .lnk files as normal files without hydrating them or creating a placeholder. Signed-off-by: allexzander --- diff --git a/src/libsync/discovery.cpp b/src/libsync/discovery.cpp index a24cb4d68..9c3f2d9d0 100644 --- a/src/libsync/discovery.cpp +++ b/src/libsync/discovery.cpp @@ -510,13 +510,13 @@ void ProcessDirectoryJob::processFileAnalyzeRemoteInfo( && item->_type == ItemTypeFile && opts._vfs->mode() != Vfs::Off && _pinState != PinState::AlwaysLocal - ) { - item->_type = ItemTypeVirtualFile; #ifdef Q_OS_WIN - if(FileSystem::isLnkFile(path._server)) { - item->_type = ItemTypeVirtualFileDownload; - } + // on Windows, ".lnk" files are causing troubles with QFileInfo - always treat them as normal files + && !FileSystem::isLnkFile(path._server) #endif + ) { + item->_type = ItemTypeVirtualFile; + if (isVfsWithSuffix()) addVirtualFileSuffix(tmp_path._original); } diff --git a/src/libsync/vfs/cfapi/vfs_cfapi.cpp b/src/libsync/vfs/cfapi/vfs_cfapi.cpp index b5b2cb9e2..d8b96cb41 100644 --- a/src/libsync/vfs/cfapi/vfs_cfapi.cpp +++ b/src/libsync/vfs/cfapi/vfs_cfapi.cpp @@ -197,9 +197,9 @@ bool VfsCfApi::statTypeVirtualFile(csync_file_stat_t *stat, void *statData) return true; } else if (!isSparseFile && isUnpinned){ if (!FileSystem::isLnkFile(stat->path)) { - stat->type = ItemTypeVirtualFileDehydration; + stat->type = ItemTypeVirtualFileDehydration; + return true; } - return true; } else if (isSparseFile) { stat->type = ItemTypeVirtualFile; return true;