From 035c67f7f535760c81d8ef26ad366f2d2ebe5c57 Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Wed, 22 Feb 2023 10:04:46 +0100 Subject: [PATCH] ProjectExplorer: Fix relative node paths The previous change for QTCREATORBUG-288 introduced an issue where relative folder nodes would include ".." in their internal path. This made it impossible for code to search for absolute directory names. This fix makes it so that the path of folder nodes are cleaned. Fixes: QTCREATORBUG-28826 Change-Id: I3fd5b289b10f012b6bacb7f13bdbc71f905fb252 Reviewed-by: Christian Kandeler --- src/plugins/projectexplorer/projectnodes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/projectnodes.cpp b/src/plugins/projectexplorer/projectnodes.cpp index 79c325c9acb..10699b7d90d 100644 --- a/src/plugins/projectexplorer/projectnodes.cpp +++ b/src/plugins/projectexplorer/projectnodes.cpp @@ -68,7 +68,7 @@ static FolderNode *recursiveFindOrCreateFolderNode(FolderNode *folder, ProjectExplorer::FolderNode *parent = folder; for (const QString &part : std::as_const(parts)) { - path = path.pathAppended(part); + path = path.pathAppended(part).cleanPath(); // Find folder in subFolders FolderNode *next = parent->folderNode(path); if (!next) {