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-03-31 14:47:34 +0300
committerallexzander (Rebase PR Action) <allexzander@users.noreply.github.com>2021-04-07 12:08:02 +0300
commitd5b6d93978a772185a9c122fb391be1fa0e7ec84 (patch)
tree7859f5ce7b80f7bb4c2f0cf73ce284e667d6785f /src/libsync/discovery.cpp
parent4a7145f1f30fec69a76bf25d537c3226b72cbbd7 (diff)
Fix VFS freeze when syncing '.lnk' files on Windows.
Signed-off-by: allexzander <blackslayer4@gmail.com>
Diffstat (limited to 'src/libsync/discovery.cpp')
-rw-r--r--src/libsync/discovery.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/libsync/discovery.cpp b/src/libsync/discovery.cpp
index edded199a..7d12a8acd 100644
--- a/src/libsync/discovery.cpp
+++ b/src/libsync/discovery.cpp
@@ -501,12 +501,22 @@ 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) {
+ && _pinState != PinState::AlwaysLocal
+ && !forceAlwaysLocal) {
item->_type = ItemTypeVirtualFile;
if (isVfsWithSuffix())
addVirtualFileSuffix(tmp_path._original);