Fix a bug preventing sync root in folder on drive roots
authorxjzsq <sdxjzsq@126.com>
Sat, 14 Dec 2024 18:07:12 +0000 (02:07 +0800)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Mon, 16 Dec 2024 14:10:46 +0000 (14:10 +0000)
Fixes: <https://github.com/nextcloud/desktop/issues/7658>
Signed-off-by: xjzsq <sdxjzsq@126.com>
src/common/vfs.cpp

index 69e51be50944c72c7ad7523cec02f60176129244..4f22bfedb0dec2e1d86f77945b76da9992945c5a 100644 (file)
@@ -71,7 +71,7 @@ Result<void, QString> Vfs::checkAvailability(const QString &path, Vfs::Mode mode
 #ifdef Q_OS_WIN
     if (mode == Mode::WindowsCfApi) {
         const auto info = QFileInfo(path);
-        if (QDir(info.canonicalPath()).isRoot()) {
+        if (QDir(info.canonicalFilePath()).isRoot()) {
             return tr("The Virtual filesystem feature does not support a drive as sync root");
         }
         const auto fs = FileSystem::fileSystemForPath(info.absoluteFilePath());