From 7060fe697e84c17d8f5db309b99d0264681f52a5 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 12 Mar 2011 20:16:16 +0000 Subject: use legalize_for_path() on filenames for export presets and formats git-svn-id: svn://localhost/ardour2/branches/3.0@9126 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/export_profile_manager.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libs/ardour/export_profile_manager.cc') 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; -- cgit v1.2.3