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 <christian.kandeler@qt.io>
This commit is contained in:
Marcus Tillmanns
2023-02-22 10:04:46 +01:00
parent 0328c14167
commit 035c67f7f5

View File

@@ -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) {