const auto mode = bestAvailableVfsMode();
#ifdef Q_OS_WIN
if (mode == Mode::WindowsCfApi) {
- const auto fs = FileSystem::fileSystemForPath(path);
+ const auto info = QFileInfo(path);
+ if (QDir(info.canonicalPath()).isRoot()) {
+ return tr("The Virtual filesystem feature does not support a drive as sync root");
+ }
+ const auto fs = FileSystem::fileSystemForPath(info.absoluteFilePath());
if (fs != QLatin1String("NTFS")) {
return tr("The Virtual filesystem feature requires a NTFS file system, %1 is using %2").arg(path, fs);
}
+ const auto type = GetDriveTypeW(reinterpret_cast<const wchar_t *>(QDir::toNativeSeparators(info.absoluteFilePath().mid(0, 3)).utf16()));
+ if (type == DRIVE_REMOTE) {
+ return tr("The Virtual filesystem feature is not supported on network drives");
+ }
}
#else
Q_UNUSED(mode)