File tree Expand file tree Collapse file tree 3 files changed +4
-13
lines changed
Expand file tree Collapse file tree 3 files changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -168,12 +168,7 @@ void CreateProjectDialogD::loadTemplates(const editor& e){
168168 templateCtrl->ClearAll ();
169169
170170 // open the folder
171- #if __APPLE__
172- auto templatesFolder = e.path / templatesDir;
173-
174- #else
175- auto templatesFolder = e.path /e.name / templatesDir;
176- #endif
171+ auto templatesFolder = e.templatePath ();
177172
178173 for (const auto & entry : std::filesystem::directory_iterator{templatesFolder}){
179174 // does the file start with the correct prefix?
@@ -182,7 +177,7 @@ void CreateProjectDialogD::loadTemplates(const editor& e){
182177 // add it to the UI
183178 wxListItem i;
184179 i.SetId (0 );
185- string label = path.filename ();
180+ string label = path.filename (). string () ;
186181 i.SetText (label.substr (templatePrefix.length ()+1 ));
187182
188183 templateCtrl->InsertItem (i);
Original file line number Diff line number Diff line change @@ -117,11 +117,7 @@ struct editor {
117117 std::string name;
118118 std::filesystem::path path;
119119 decltype (path) executablePath() const {
120- #if __APPLE__
121- return path / executable;
122- #else
123- return path / name / executable;
124- #endif
120+ return path / executable;
125121 }
126122
127123 auto templatePath () const {
Original file line number Diff line number Diff line change @@ -637,7 +637,7 @@ void MainFrameDerived::LoadEditorVersions(){
637637 auto p = entry / executable;
638638 if (filesystem::exists (p)){
639639 // add it to the backing datastructure
640- editor e = {entry.filename (), p };
640+ editor e = {entry.filename (). string (), entry };
641641 addInstall (e);
642642 }
643643#endif
You can’t perform that action at this time.
0 commit comments