From 06b579a75be7924462a3cdfe9ecb8e60b3e01524 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Wed, 8 Feb 2023 09:27:27 +0100 Subject: McuSupport: Fix handling of FilePath ..when expanding variables and macros. Fixes the plugin unit test on Windows. Fixes: QTCREATORBUG-28744 Change-Id: I8a047854d6d43e901b01b10660e29b7d6544d0b7 Reviewed-by: Alessandro Portale --- src/plugins/mcusupport/mcusupportoptions.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/mcusupport/mcusupportoptions.cpp b/src/plugins/mcusupport/mcusupportoptions.cpp index e66c87ff5e..474314b6a6 100644 --- a/src/plugins/mcusupport/mcusupportoptions.cpp +++ b/src/plugins/mcusupport/mcusupportoptions.cpp @@ -113,8 +113,7 @@ void McuSdkRepository::expandVariablesAndWildcards() } // drop empty_split_entry(linux)|root(windows) QString root = pathComponents.takeFirst(); - if (root.isEmpty()) // Linux - root = "/"; + root.append('/'); // ensure we have a path (UNIX just a '/', Windows 'C:/' or similar) package->setPath( expandWildcards(FilePath::fromString(root), -- cgit v1.2.1