diff options
author | allexzander <blackslayer4@gmail.com> | 2021-03-31 16:36:13 +0300 |
---|---|---|
committer | allexzander (Rebase PR Action) <allexzander@users.noreply.github.com> | 2021-04-07 12:08:02 +0300 |
commit | 7235c708dced0e4c6262e8ac3fae23d9e303b609 (patch) | |
tree | 5558659c8c12e2811465bf7a2b5f516c4908406b /src/libsync/discovery.cpp | |
parent | d5b6d93978a772185a9c122fb391be1fa0e7ec84 (diff) |
Added .lnk file placeholder creation fix.
Signed-off-by: allexzander <blackslayer4@gmail.com>
Diffstat (limited to 'src/libsync/discovery.cpp')
-rw-r--r-- | src/libsync/discovery.cpp | 17 |
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); |