Docker: Use only path part of FilePath when mapping to device

Otherwise neither normalizedPathName nor startsWithDriveLetter works as
intended when used with a non local path, but these are required to take
the correct code path in FilePath::mapToDevicePath.

Change-Id: I25e8f1a6a01a3e4056633ff3afec883cfbeb0e46
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
David Schulz
2021-10-13 09:56:52 +02:00
parent ba7aa5ea9c
commit 7e9f955a58

View File

@@ -1066,7 +1066,7 @@ QString DockerDevice::mapToDevicePath(const Utils::FilePath &globalPath) const
{
// make sure to convert windows style paths to unix style paths with the file system case:
// C:/dev/src -> /c/dev/src
const FilePath normalized = globalPath.normalizedPathName();
const FilePath normalized = FilePath::fromString(globalPath.path()).normalizedPathName();
QString path = normalized.path();
if (normalized.startsWithDriveLetter()) {
const QChar lowerDriveLetter = path.at(0).toLower();