Utils: Allow FilePath::onDevice for local paths

Change-Id: I1ae62e077382abddbb32327897e87331cfc02476
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Marcus Tillmanns
2023-01-10 15:19:27 +01:00
parent 8ee6b14f00
commit b39010af79

View File

@@ -1210,7 +1210,7 @@ FilePath FilePath::onDevice(const FilePath &deviceTemplate) const
if (sameDevice) if (sameDevice)
return *this; return *this;
// TODO: converting paths between different non local devices is still unsupported // TODO: converting paths between different non local devices is still unsupported
QTC_CHECK(!needsDevice()); QTC_CHECK(!needsDevice() || !deviceTemplate.needsDevice());
return fromParts(deviceTemplate.scheme(), return fromParts(deviceTemplate.scheme(),
deviceTemplate.host(), deviceTemplate.host(),
deviceTemplate.fileAccess()->mapToDevicePath(path())); deviceTemplate.fileAccess()->mapToDevicePath(path()));