mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
Legalize template names, allow to copy across machines
Templates can be exported/imported and hence need universal legal paths
This commit is contained in:
parent
20d901e3b3
commit
cecac3d895
2 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue