summaryrefslogtreecommitdiff
path: root/libs/ardour/export_profile_manager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/export_profile_manager.cc')
-rw-r--r--libs/ardour/export_profile_manager.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/ardour/export_profile_manager.cc b/libs/ardour/export_profile_manager.cc
index 893788809f..cec6d0fefe 100644
--- a/libs/ardour/export_profile_manager.cc
+++ b/libs/ardour/export_profile_manager.cc
@@ -184,7 +184,8 @@ ExportProfileManager::load_presets ()
ExportProfileManager::PresetPtr
ExportProfileManager::save_preset (string const & name)
{
- string filename = export_config_dir.to_string() + "/" + name + export_preset_suffix;
+ string safe_name = legalize_for_path (name);
+ string filename = export_config_dir.to_string() + "/" + safe_name + export_preset_suffix;
if (!current_preset) {
current_preset.reset (new ExportPreset (filename, session));
@@ -519,6 +520,10 @@ ExportProfileManager::save_format_to_disk (FormatPtr format)
string new_name = format->name();
new_name += export_format_suffix;
+ /* make sure its legal for the filesystem */
+
+ new_name = legalize_for_path (new_name);
+
sys::path new_path (export_config_dir);
new_path /= new_name;