From 8cbb9727e959a744057de387a293aecdce09a62c Mon Sep 17 00:00:00 2001 From: Sakari Bergen Date: Sun, 17 Mar 2013 12:32:48 +0200 Subject: 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... --- libs/ardour/export_format_specification.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'libs/ardour/export_format_specification.cc') diff --git a/libs/ardour/export_format_specification.cc b/libs/ardour/export_format_specification.cc index ce61babcbf..b139faeee2 100644 --- a/libs/ardour/export_format_specification.cc +++ b/libs/ardour/export_format_specification.cc @@ -189,13 +189,17 @@ ExportFormatSpecification::ExportFormatSpecification (Session & s, XMLNode const set_state (state); } -ExportFormatSpecification::ExportFormatSpecification (ExportFormatSpecification const & other) +ExportFormatSpecification::ExportFormatSpecification (ExportFormatSpecification const & other, bool modify_name) : ExportFormatBase(other) , session (other.session) , _silence_beginning (other.session) , _silence_end (other.session) { - set_name (other.name() + " (copy)"); + if (modify_name) { + set_name (other.name() + " (copy)"); + } else { + set_name (other.name()); + } _format_name = other._format_name; has_sample_format = other.has_sample_format; -- cgit v1.2.3