diff --git a/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp b/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp index 4ccf0996..85f2130f 100644 --- a/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp +++ b/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp @@ -1019,9 +1019,10 @@ void ProjectPanel::recursiveAddFilesFrom(const TCHAR *folderPath, HTREEITEM hTre dirFilter += TEXT("*.*"); WIN32_FIND_DATA foundData; + std::vector files; HANDLE hFile = ::FindFirstFile(dirFilter.c_str(), &foundData); - + do { if (hFile == INVALID_HANDLE_VALUE) break; @@ -1048,14 +1049,19 @@ void ProjectPanel::recursiveAddFilesFrom(const TCHAR *folderPath, HTREEITEM hTre } else { - generic_string pathFile(folderPath); - if (folderPath[lstrlen(folderPath)-1] != '\\') - pathFile += TEXT("\\"); - pathFile += foundData.cFileName; - TCHAR *strValueLabel = ::PathFindFileName(pathFile.c_str()); - _treeView.addItem(strValueLabel, hTreeItem, INDEX_LEAF, pathFile.c_str()); + files.push_back(foundData.cFileName); } } while (::FindNextFile(hFile, &foundData)); + + for (size_t i = 0 ; i < files.size() ; i++) + { + generic_string pathFile(folderPath); + if (folderPath[lstrlen(folderPath)-1] != '\\') + pathFile += TEXT("\\"); + pathFile += files[i]; + _treeView.addItem(files[i].c_str(), hTreeItem, INDEX_LEAF, pathFile.c_str()); + } + ::FindClose(hFile); } diff --git a/PowerEditor/visual.net/notepadPlus.vcproj b/PowerEditor/visual.net/notepadPlus.vcproj index 9f6259ec..9850005f 100644 --- a/PowerEditor/visual.net/notepadPlus.vcproj +++ b/PowerEditor/visual.net/notepadPlus.vcproj @@ -1611,11 +1611,11 @@ >