Skip to content

Commit c196b44

Browse files
committed
also replace space in projectTitle
1 parent f7a69ef commit c196b44

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Source/Heavy/ExporterBase.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ struct ExporterBase : public Component
134134
auto patchPath = patchFile.getFullPathName();
135135
auto const& outPath = outDir.getFullPathName();
136136
#endif
137-
137+
138138
auto projectTitle = projectNameValue.toString();
139139
auto projectCopyright = projectCopyrightValue.toString();
140140

@@ -144,7 +144,8 @@ struct ExporterBase : public Component
144144
else
145145
projectTitle = "Untitled";
146146
}
147-
projectTitle = projectTitle.replaceCharacter('-', '_');
147+
// Replace dash and space with underscore
148+
projectTitle = projectTitle.replaceCharacter('-', '_').replaceCharacter(' ', '_');
148149

149150
// Add original file location to search paths
150151
auto searchPaths = StringArray {};
@@ -172,7 +173,7 @@ struct ExporterBase : public Component
172173
addJob([this, patchPath, outPath, projectTitle, projectCopyright, searchPaths]() mutable {
173174
exportingView->monitorProcessOutput(this);
174175
exportingView->showState(ExportingProgressView::Exporting);
175-
176+
176177
auto const result = performExport(patchPath, outPath, projectTitle, projectCopyright, searchPaths);
177178

178179
if (shouldQuit)

0 commit comments

Comments
 (0)