File tree 3 files changed +4
-13
lines changed
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){
168
168
templateCtrl->ClearAll ();
169
169
170
170
// 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 ();
177
172
178
173
for (const auto & entry : std::filesystem::directory_iterator{templatesFolder}){
179
174
// does the file start with the correct prefix?
@@ -182,7 +177,7 @@ void CreateProjectDialogD::loadTemplates(const editor& e){
182
177
// add it to the UI
183
178
wxListItem i;
184
179
i.SetId (0 );
185
- string label = path.filename ();
180
+ string label = path.filename (). string () ;
186
181
i.SetText (label.substr (templatePrefix.length ()+1 ));
187
182
188
183
templateCtrl->InsertItem (i);
Original file line number Diff line number Diff line change @@ -117,11 +117,7 @@ struct editor {
117
117
std::string name;
118
118
std::filesystem::path path;
119
119
decltype (path) executablePath() const {
120
- #if __APPLE__
121
- return path / executable;
122
- #else
123
- return path / name / executable;
124
- #endif
120
+ return path / executable;
125
121
}
126
122
127
123
auto templatePath () const {
Original file line number Diff line number Diff line change @@ -637,7 +637,7 @@ void MainFrameDerived::LoadEditorVersions(){
637
637
auto p = entry / executable;
638
638
if (filesystem::exists (p)){
639
639
// add it to the backing datastructure
640
- editor e = {entry.filename (), p };
640
+ editor e = {entry.filename (). string (), entry };
641
641
addInstall (e);
642
642
}
643
643
#endif
You can’t perform that action at this time.
0 commit comments