Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorallexzander <blackslayer4@gmail.com>2021-04-01 17:54:45 +0300
committerallexzander (Rebase PR Action) <allexzander@users.noreply.github.com>2021-04-07 12:08:02 +0300
commitcb8b6ccd9b55f81ed2861d47d397b3b9e599fd00 (patch)
treee492f05daf52ce9b48f2405d8c921e6fddbfbc37 /src/libsync/discovery.cpp
parent13f4bb541d0a675daf347c352cf758ef8a8db0c6 (diff)
Ignore *.lnk files on Windows.
Signed-off-by: allexzander <blackslayer4@gmail.com>
Diffstat (limited to 'src/libsync/discovery.cpp')
-rw-r--r--src/libsync/discovery.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libsync/discovery.cpp b/src/libsync/discovery.cpp
index 9c3f2d9d0..636e64c9d 100644
--- a/src/libsync/discovery.cpp
+++ b/src/libsync/discovery.cpp
@@ -180,9 +180,15 @@ void ProcessDirectoryJob::process()
// local stat function.
// Recall file shall not be ignored (#4420)
bool isHidden = e.localEntry.isHidden || (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 isServerEntrySymLink = !e.localEntry.isValid() && e.serverEntry.isValid() && !e.serverEntry.isDirectory && FileSystem::isLnkFile(e.serverEntry.name);
+#else
+ const bool isServerEntrySymLink = false;
+#endif
if (handleExcluded(path._target, e.localEntry.name,
e.localEntry.isDirectory || e.serverEntry.isDirectory, isHidden,
- e.localEntry.isSymLink))
+ e.localEntry.isSymLink || isServerEntrySymLink))
continue;
if (_queryServer == InBlackList || _discoveryData->isInSelectiveSyncBlackList(path._original)) {
@@ -509,14 +515,8 @@ void ProcessDirectoryJob::processFileAnalyzeRemoteInfo(
if (!localEntry.isValid()
&& item->_type == ItemTypeFile
&& opts._vfs->mode() != Vfs::Off
- && _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
- ) {
+ && _pinState != PinState::AlwaysLocal) {
item->_type = ItemTypeVirtualFile;
-
if (isVfsWithSuffix())
addVirtualFileSuffix(tmp_path._original);
}