diff --git a/src/libs/utils/filepath.cpp b/src/libs/utils/filepath.cpp index 70487d6d3dc..fa969ee7a86 100644 --- a/src/libs/utils/filepath.cpp +++ b/src/libs/utils/filepath.cpp @@ -1083,6 +1083,7 @@ QString FilePath::calcRelativePath(const QString &absolutePath, const QString &a */ FilePath FilePath::onDevice(const FilePath &deviceTemplate) const { + isSameDevice(deviceTemplate); const bool sameDevice = scheme() == deviceTemplate.scheme() && host() == deviceTemplate.host(); if (sameDevice) return *this; diff --git a/src/plugins/projectexplorer/devicesupport/desktopdevice.cpp b/src/plugins/projectexplorer/devicesupport/desktopdevice.cpp index e65e9892a18..c6209cf094c 100644 --- a/src/plugins/projectexplorer/devicesupport/desktopdevice.cpp +++ b/src/plugins/projectexplorer/devicesupport/desktopdevice.cpp @@ -150,4 +150,11 @@ Environment DesktopDevice::systemEnvironment() const return Environment::systemEnvironment(); } +FilePath DesktopDevice::rootPath() const +{ + if (id() == DESKTOP_DEVICE_ID) + return FilePath::fromParts({}, {}, QDir::rootPath()); + return IDevice::rootPath(); +} + } // namespace ProjectExplorer diff --git a/src/plugins/projectexplorer/devicesupport/desktopdevice.h b/src/plugins/projectexplorer/devicesupport/desktopdevice.h index 7144eba8eea..32b456b6784 100644 --- a/src/plugins/projectexplorer/devicesupport/desktopdevice.h +++ b/src/plugins/projectexplorer/devicesupport/desktopdevice.h @@ -36,6 +36,8 @@ public: Utils::Environment systemEnvironment() const override; Utils::FilePath mapToGlobalPath(const Utils::FilePath &pathOnDevice) const override; + Utils::FilePath rootPath() const override; + protected: DesktopDevice();