From e620299fda0ff234b4935781653d42533a95a304 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 1 Dec 2022 10:52:24 +0100 Subject: [PATCH] McuSupport: Fix tests on Windows Change-Id: I465fa2dc93ddeed2b3ef3d754b3992f88973862f Reviewed-by: Yasser Grimes Reviewed-by: Reviewed-by: hjk --- src/plugins/mcusupport/mcusupportoptions.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/mcusupport/mcusupportoptions.cpp b/src/plugins/mcusupport/mcusupportoptions.cpp index d2d57973b11..96ed4cd654a 100644 --- a/src/plugins/mcusupport/mcusupportoptions.cpp +++ b/src/plugins/mcusupport/mcusupportoptions.cpp @@ -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); }