Legalize template names, allow to copy across machines

Templates can be exported/imported and hence need universal
legal paths
This commit is contained in:
Robin Gareus 2025-11-03 19:49:22 +01:00
parent 20d901e3b3
commit cecac3d895
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
2 changed files with 2 additions and 2 deletions

View file

@ -2275,7 +2275,7 @@ void
ARDOUR_UI::save_template_dialog_response (int response, SaveTemplateDialog* d)
{
if (response == RESPONSE_ACCEPT) {
const string name = legalize_for_path (d->get_template_name ());
const string name = legalize_for_universal_path (d->get_template_name ());
const string desc = d->get_description ();
int failed = _session->save_template (name, desc);

View file

@ -1951,7 +1951,7 @@ RouteUI::save_as_template_dialog_response (int response, SaveTemplateDialog* d)
if (response == RESPONSE_ACCEPT) {
const string name = d->get_template_name ();
const string desc = d->get_description ();
const string path = Glib::build_filename(ARDOUR::user_route_template_directory (), legalize_for_path (name) + ARDOUR::template_suffix);
const string path = Glib::build_filename(ARDOUR::user_route_template_directory (), legalize_for_universal_path (name) + ARDOUR::template_suffix);
if (Glib::file_test (path, Glib::FILE_TEST_EXISTS)) { /* file already exists. */
bool overwrite = overwrite_file_dialog (*d,