McuSupport: Fix tests on Windows

Change-Id: I465fa2dc93ddeed2b3ef3d754b3992f88973862f
Reviewed-by: Yasser Grimes <yasser.grimes@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Stenger
2022-12-01 10:52:24 +01:00
parent 0c9706ada9
commit e620299fda

View File

@@ -111,10 +111,12 @@ void McuSdkRepository::expandVariablesAndWildcards()
continue;
}
// drop empty_split_entry(linux)|root(windows)
pathComponents.pop_front();
QString root = pathComponents.takeFirst();
if (root.isEmpty()) // Linux
root = "/";
package->setPath(
expandWildcards(FilePath::fromString(QDir::rootPath()),
expandWildcards(FilePath::fromString(root),
{pathComponents.constBegin(), pathComponents.constEnd()})
.first);
}