Treat .lnk files as normal files without hydrating them or creating a placeholder.

Signed-off-by: allexzander <blackslayer4@gmail.com>
This commit is contained in:
allexzander 2021-04-01 16:09:26 +03:00 committed by allexzander (Rebase PR Action)
parent 3906ae0922
commit 13f4bb541d
2 changed files with 7 additions and 7 deletions

View file

@ -510,13 +510,13 @@ void ProcessDirectoryJob::processFileAnalyzeRemoteInfo(
&& item->_type == ItemTypeFile && item->_type == ItemTypeFile
&& opts._vfs->mode() != Vfs::Off && opts._vfs->mode() != Vfs::Off
&& _pinState != PinState::AlwaysLocal && _pinState != PinState::AlwaysLocal
#ifdef Q_OS_WIN
// on Windows, ".lnk" files are causing troubles with QFileInfo - always treat them as normal files
&& !FileSystem::isLnkFile(path._server)
#endif
) { ) {
item->_type = ItemTypeVirtualFile; item->_type = ItemTypeVirtualFile;
#ifdef Q_OS_WIN
if(FileSystem::isLnkFile(path._server)) {
item->_type = ItemTypeVirtualFileDownload;
}
#endif
if (isVfsWithSuffix()) if (isVfsWithSuffix())
addVirtualFileSuffix(tmp_path._original); addVirtualFileSuffix(tmp_path._original);
} }

View file

@ -197,9 +197,9 @@ bool VfsCfApi::statTypeVirtualFile(csync_file_stat_t *stat, void *statData)
return true; return true;
} else if (!isSparseFile && isUnpinned){ } else if (!isSparseFile && isUnpinned){
if (!FileSystem::isLnkFile(stat->path)) { if (!FileSystem::isLnkFile(stat->path)) {
stat->type = ItemTypeVirtualFileDehydration; stat->type = ItemTypeVirtualFileDehydration;
return true;
} }
return true;
} else if (isSparseFile) { } else if (isSparseFile) {
stat->type = ItemTypeVirtualFile; stat->type = ItemTypeVirtualFile;
return true; return true;