forked from qt-creator/qt-creator
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:
@@ -68,7 +68,7 @@ static FolderNode *recursiveFindOrCreateFolderNode(FolderNode *folder,
|
|||||||
|
|
||||||
ProjectExplorer::FolderNode *parent = folder;
|
ProjectExplorer::FolderNode *parent = folder;
|
||||||
for (const QString &part : std::as_const(parts)) {
|
for (const QString &part : std::as_const(parts)) {
|
||||||
path = path.pathAppended(part);
|
path = path.pathAppended(part).cleanPath();
|
||||||
// Find folder in subFolders
|
// Find folder in subFolders
|
||||||
FolderNode *next = parent->folderNode(path);
|
FolderNode *next = parent->folderNode(path);
|
||||||
if (!next) {
|
if (!next) {
|
||||||
|
Reference in New Issue
Block a user