From 81f404d63c429bb165464387dd5113bfdad925ba Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Mon, 7 Mar 2022 21:10:59 +0800 Subject: [PATCH] - fix: crash when open a project that contains custom folder --- NEWS.md | 1 + RedPandaIDE/project.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index 0e2c4367..fe21523d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -19,6 +19,7 @@ Red Panda C++ Version 0.14.5 - fix: the scroll behavior of mouse dragging on the editor's edge is not correct - fix: calculation of caret position is not in consistence. - fix: undo one symbol completion as a whole operation + - fix: crash when open a project that contains custom folder Red Panda C++ Version 0.14.4 - enhancement: git - log diff --git a/RedPandaIDE/project.cpp b/RedPandaIDE/project.cpp index 9344203b..33acc3e0 100644 --- a/RedPandaIDE/project.cpp +++ b/RedPandaIDE/project.cpp @@ -1308,8 +1308,8 @@ void Project::createFileSystemFolderNode(ProjectSpecialFolderNode folderType, co continue; if (fileInfo.isDir()) { PProjectModelNode node = makeNewFileNode(fileInfo.fileName(),true,parent); - mFileSystemFolderNodes.insert(QString("%1/%2").arg((int)folderType).arg(fileInfo.absolutePath()),node); - createFileSystemFolderNode(folderType,fileInfo.path(), node); + mFileSystemFolderNodes.insert(QString("%1/%2").arg((int)folderType).arg(fileInfo.absoluteFilePath()),node); + createFileSystemFolderNode(folderType,fileInfo.absoluteFilePath(), node); } } }