Prevent leaking "recorder:" into the file-name
This is safeguard. It should not happen since _write_source_name once Track::set_name () sets this unconditionally.
This commit is contained in:
parent
1d106c88ca
commit
bb50925998
@ -58,13 +58,7 @@ public:
|
||||
|
||||
bool set_write_source_name (const std::string& str);
|
||||
|
||||
std::string write_source_name () const {
|
||||
if (_write_source_name.empty ()) {
|
||||
return name ();
|
||||
} else {
|
||||
return _write_source_name;
|
||||
}
|
||||
}
|
||||
std::string write_source_name () const;
|
||||
|
||||
boost::shared_ptr<AudioFileSource> audio_write_source (uint32_t n = 0) {
|
||||
boost::shared_ptr<ChannelList> c = channels.reader ();
|
||||
|
@ -129,6 +129,20 @@ DiskWriter::set_write_source_name (string const & str)
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string
|
||||
DiskWriter::write_source_name () const
|
||||
{
|
||||
if (!_write_source_name.empty ()) {
|
||||
return _write_source_name;
|
||||
}
|
||||
|
||||
std::string const& n (name ());
|
||||
if (n.find (X_("recorder:")) == 0 && n.size () > 9) {
|
||||
return n.substr (9);
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
void
|
||||
DiskWriter::check_record_status (samplepos_t transport_sample, double speed, bool can_record)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user