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

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannah von Reth <hannah.vonreth@owncloud.com>2021-09-13 16:01:34 +0300
committerHannah von Reth <vonreth@kde.org>2021-09-15 18:20:01 +0300
commit65b67b3ff594b5b9baa6f52108510afff1c99f7c (patch)
tree8f1d6b1938c35ee219c599ffbdbafbf265d8c284 /src/common
parentc0b4c4817cfd858d9a59bb67e4a65a532c1fdfe3 (diff)
Fix crash on missing sync root
Fixes: #9016
Diffstat (limited to 'src/common')
-rw-r--r--src/common/vfs.cpp4
-rw-r--r--src/common/vfs.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/common/vfs.cpp b/src/common/vfs.cpp
index efa0bee7b..55cbcc942 100644
--- a/src/common/vfs.cpp
+++ b/src/common/vfs.cpp
@@ -63,10 +63,9 @@ Optional<Vfs::Mode> Vfs::modeFromString(const QString &str)
return {};
}
-Result<void, QString> Vfs::checkAvailability(const QString &path)
+Result<void, QString> Vfs::checkAvailability(const QString &path, Vfs::Mode mode)
{
#ifdef Q_OS_WIN
- const auto mode = bestAvailableVfsMode();
if (mode == Mode::WindowsCfApi) {
const auto info = QFileInfo(path);
if (QDir(info.canonicalFilePath()).isRoot()) {
@@ -82,6 +81,7 @@ Result<void, QString> Vfs::checkAvailability(const QString &path)
}
}
#else
+ Q_UNUSED(mode);
Q_UNUSED(path);
#endif
return {};
diff --git a/src/common/vfs.h b/src/common/vfs.h
index 84e95e55f..e08a3c8d8 100644
--- a/src/common/vfs.h
+++ b/src/common/vfs.h
@@ -107,7 +107,7 @@ public:
static QString modeToString(Mode mode);
static Optional<Mode> modeFromString(const QString &str);
- static Result<void, QString> checkAvailability(const QString &path);
+ static Result<void, QString> checkAvailability(const QString &path, OCC::Vfs::Mode mode);
enum class AvailabilityError
{