From dfe07760021caebd2c4ca93f90fe36ef3c720ba2 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 10 May 2022 15:45:34 +0200 Subject: [PATCH] RemoteLinux: Avoid two explicit uses of IDevice::mapToGlobalPath() Change-Id: I5e1e3f3de1118234dcaf1faa5690662876e85b4c Reviewed-by: Jarek Kobus --- src/plugins/remotelinux/linuxdevice.cpp | 2 +- .../remotelinux/remotelinuxcheckforfreediskspacestep.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/plugins/remotelinux/linuxdevice.cpp b/src/plugins/remotelinux/linuxdevice.cpp index 91c4baed5d2..ae27e748cb3 100644 --- a/src/plugins/remotelinux/linuxdevice.cpp +++ b/src/plugins/remotelinux/linuxdevice.cpp @@ -1027,7 +1027,7 @@ LinuxDevice::LinuxDevice() d->m_terminals.removeOne(proc); }); - proc->setCommand({ mapToGlobalPath({}), {}}); + proc->setCommand({filePath({}), {}}); proc->setTerminalMode(TerminalMode::On); proc->setEnvironment(env); proc->setWorkingDirectory(workingDir); diff --git a/src/plugins/remotelinux/remotelinuxcheckforfreediskspacestep.cpp b/src/plugins/remotelinux/remotelinuxcheckforfreediskspacestep.cpp index ac1bbc6f9d5..2c3650206c6 100644 --- a/src/plugins/remotelinux/remotelinuxcheckforfreediskspacestep.cpp +++ b/src/plugins/remotelinux/remotelinuxcheckforfreediskspacestep.cpp @@ -81,8 +81,7 @@ void RemoteLinuxCheckForFreeDiskSpaceService::setRequiredSpaceInBytes(quint64 si void RemoteLinuxCheckForFreeDiskSpaceService::deployAndFinish() { auto cleanup = qScopeGuard([this] { setFinished(); }); - const FilePath path - = deviceConfiguration()->mapToGlobalPath(FilePath::fromString(m_pathToCheck)); + const FilePath path = deviceConfiguration()->filePath(m_pathToCheck); const qint64 freeSpace = path.bytesAvailable(); if (freeSpace < 0) { emit errorMessage(tr("Cannot get info about free disk space for \"%1\"")