summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@qt.io>2023-02-08 09:27:27 +0100
committerChristian Stenger <christian.stenger@qt.io>2023-02-08 12:21:40 +0000
commit06b579a75be7924462a3cdfe9ecb8e60b3e01524 (patch)
treee49649e4892b1ac30512d7b638e8d16a89af6c6b
parentac252c2d49c6afb2a0f9faac4ffbf2f58e736ce9 (diff)
downloadqt-creator-06b579a75be7924462a3cdfe9ecb8e60b3e01524.tar.gz
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 <alessandro.portale@qt.io>
-rw-r--r--src/plugins/mcusupport/mcusupportoptions.cpp3
1 files changed, 1 insertions, 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),