diff options
author | Sakari Bergen <sakari.bergen@beatwaves.net> | 2013-03-17 12:32:48 +0200 |
---|---|---|
committer | Sakari Bergen <sakari.bergen@beatwaves.net> | 2013-03-17 12:32:48 +0200 |
commit | 8cbb9727e959a744057de387a293aecdce09a62c (patch) | |
tree | c7f6fb66b7057dff243ee68364d6778941817a53 /libs/ardour/export_filename.cc | |
parent | 2d081e43e197851636c0da3ed46a7b0be97120b0 (diff) |
Handle mutiple export files with the same extension but different format.
If multiple filenames have the same extension, append the format name
to the filename. This still requires a bit of extra logic to be optimal,
as the format name will now be added in some situations where it is not
needed. However, this is better than producing a broken file...
Diffstat (limited to 'libs/ardour/export_filename.cc')
-rw-r--r-- | libs/ardour/export_filename.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/ardour/export_filename.cc b/libs/ardour/export_filename.cc index a5b0a07a60..9e126ed087 100644 --- a/libs/ardour/export_filename.cc +++ b/libs/ardour/export_filename.cc @@ -49,6 +49,7 @@ ExportFilename::ExportFilename (Session & session) : include_session (false), include_revision (false), include_channel_config (false), + include_format_name (false), include_channel (false), include_timespan (true), // Include timespan name always include_time (false), @@ -206,6 +207,12 @@ ExportFilename::get_path (ExportFormatSpecPtr format) const filename_empty = false; } + if (include_format_name) { + path += filename_empty ? "" : "_"; + path += format->name(); + filename_empty = false; + } + path += "."; path += format->extension (); |