diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-03-12 20:16:16 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-03-12 20:16:16 +0000 |
commit | 7060fe697e84c17d8f5db309b99d0264681f52a5 (patch) | |
tree | 5535a7b91e88e80305373e780c87c596e869c798 /libs/ardour/export_profile_manager.cc | |
parent | 12d538b0cf13a11dd6603a6bcdcdc365f8494f65 (diff) |
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
Diffstat (limited to 'libs/ardour/export_profile_manager.cc')
-rw-r--r-- | libs/ardour/export_profile_manager.cc | 7 |
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; |