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:
Diffstat (limited to 'src/libsync/discovery.cpp')
-rw-r--r--src/libsync/discovery.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/libsync/discovery.cpp b/src/libsync/discovery.cpp
index 7d12a8acd..47b4f2cf5 100644
--- a/src/libsync/discovery.cpp
+++ b/src/libsync/discovery.cpp
@@ -14,6 +14,9 @@
#include "discovery.h"
#include "common/syncjournaldb.h"
+#ifdef Q_OS_WIN
+#include "common/filesystembase.h"
+#endif
#include "syncfileitem.h"
#include <QDebug>
#include <algorithm>
@@ -501,22 +504,16 @@ void ProcessDirectoryJob::processFileAnalyzeRemoteInfo(
});
return;
}
-#ifdef Q_OS_WIN
- const bool forceAlwaysLocal = item->_type == ItemTypeFile && item->_fileId.endsWith(".lnk");
-#else
- const bool forceAlwaysLocal = false;
-#endif
- if (forceAlwaysLocal) {
- int a = 5;
- a = 6;
- }
// Turn new remote files into virtual files if the option is enabled.
auto &opts = _discoveryData->_syncOptions;
if (!localEntry.isValid()
&& item->_type == ItemTypeFile
&& opts._vfs->mode() != Vfs::Off
&& _pinState != PinState::AlwaysLocal
- && !forceAlwaysLocal) {
+#ifdef Q_OS_WIN
+ && !FileSystem::isLnkFile(path._server)
+#endif
+ ) {
item->_type = ItemTypeVirtualFile;
if (isVfsWithSuffix())
addVirtualFileSuffix(tmp_path._original);