1
0
mirror of https://github.com/chylex/Nextcloud-Desktop.git synced 2025-05-12 05:34:09 +02:00

Revert "Merge pull request from nextcloud/bugfix/vfs-windows-lnk-files-freeze-issue"

This commit is contained in:
chylex 2022-02-07 01:17:05 +01:00
parent 85b5153bad
commit d2e5094d13
Signed by: chylex
GPG Key ID: 4DE42C8F19A80548
3 changed files with 4 additions and 7 deletions

View File

@ -163,8 +163,7 @@ std::unique_ptr<csync_file_stat_t> csync_vio_local_readdir(csync_vio_handle_t *h
} else if (handle->ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
file_stat->type = ItemTypeDirectory;
} else {
// exclude ".lnk" files as they are not essential, but, causing troubles when enabling the VFS due to QFileInfo::isDir() and other methods are freezing, which causes the ".lnk" files to start hydrating and freezing the app eventually.
file_stat->type = !OCC::FileSystem::isLnkFile(path) ? ItemTypeFile : ItemTypeSoftLink;
file_stat->type = ItemTypeFile;
}
/* Check for the hidden flag */

View File

@ -180,13 +180,13 @@ void ProcessDirectoryJob::process()
bool isHidden = e.localEntry.isHidden || (!f.first.isEmpty() && f.first[0] == '.' && f.first != QLatin1String(".sys.admin#recall#"));
#ifdef Q_OS_WIN
// exclude ".lnk" files as they are not essential, but, causing troubles when enabling the VFS due to QFileInfo::isDir() and other methods are freezing, which causes the ".lnk" files to start hydrating and freezing the app eventually.
const bool isServerEntryWindowsShortcut = !e.localEntry.isValid() && e.serverEntry.isValid() && !e.serverEntry.isDirectory && FileSystem::isLnkFile(e.serverEntry.name);
const bool isServerEntryWindowsShortcut = false;//!e.localEntry.isValid() && e.serverEntry.isValid() && !e.serverEntry.isDirectory && FileSystem::isLnkFile(e.serverEntry.name);
#else
const bool isServerEntryWindowsShortcut = false;
#endif
if (handleExcluded(path._target, e.localEntry.name,
e.localEntry.isDirectory || e.serverEntry.isDirectory, isHidden,
e.localEntry.isSymLink || isServerEntryWindowsShortcut))
e.localEntry.isSymLink))
continue;
if (_queryServer == InBlackList || _discoveryData->isInSelectiveSyncBlackList(path._original)) {

View File

@ -190,8 +190,6 @@ bool VfsCfApi::statTypeVirtualFile(csync_file_stat_t *stat, void *statData)
const auto hasReparsePoint = (ffd->dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) != 0;
const auto hasCloudTag = (ffd->dwReserved0 & IO_REPARSE_TAG_CLOUD) != 0;
const auto isWindowsShortcut = !isDirectory && FileSystem::isLnkFile(stat->path);
const auto isExcludeFile = !isDirectory && FileSystem::isExcludeFile(stat->path);
// It's a dir with a reparse point due to the placeholder info (hence the cloud tag)
@ -205,7 +203,7 @@ bool VfsCfApi::statTypeVirtualFile(csync_file_stat_t *stat, void *statData)
} else if (isSparseFile && isPinned) {
stat->type = ItemTypeVirtualFileDownload;
return true;
} else if (!isSparseFile && isUnpinned && !isWindowsShortcut && !isExcludeFile) {
} else if (!isSparseFile && isUnpinned && !isExcludeFile) {
stat->type = ItemTypeVirtualFileDehydration;
return true;
} else if (isSparseFile) {