From: allexzander Date: Tue, 6 Apr 2021 07:36:35 +0000 (+0300) Subject: Fix review comments. X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~21^2~275^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=82953d0601787ba3557b5d5fb852516d589cec1c;p=nextcloud-desktop.git Fix review comments. Signed-off-by: allexzander --- diff --git a/src/csync/vio/csync_vio_local_win.cpp b/src/csync/vio/csync_vio_local_win.cpp index cc31927d5..7aa07f4da 100644 --- a/src/csync/vio/csync_vio_local_win.cpp +++ b/src/csync/vio/csync_vio_local_win.cpp @@ -163,7 +163,8 @@ std::unique_ptr csync_vio_local_readdir(csync_vio_handle_t *h } else if (handle->ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { file_stat->type = ItemTypeDirectory; } else { - file_stat->type = ItemTypeFile; + // 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; } /* Check for the hidden flag */ diff --git a/src/libsync/discoveryphase.cpp b/src/libsync/discoveryphase.cpp index bce9276ad..c8b522dcf 100644 --- a/src/libsync/discoveryphase.cpp +++ b/src/libsync/discoveryphase.cpp @@ -20,7 +20,6 @@ #include "common/asserts.h" #include "common/checksums.h" -#include "common/filesystembase.h" #include #include "vio/csync_vio_local.h" @@ -306,13 +305,7 @@ void DiscoverySingleLocalDirectoryJob::run() { i.inode = dirent->inode; i.isDirectory = dirent->type == ItemTypeDirectory; i.isHidden = dirent->is_hidden; -#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 isWindowsShortcut = dirent->type == ItemTypeFile && FileSystem::isLnkFile(i.name); -#else - const bool isWindowsShortcut = false; -#endif - i.isSymLink = dirent->type == ItemTypeSoftLink || isWindowsShortcut; + i.isSymLink = dirent->type == ItemTypeSoftLink; i.isVirtualFile = dirent->type == ItemTypeVirtualFile || dirent->type == ItemTypeVirtualFileDownload; i.type = dirent->type; results.push_back(i);