diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-04-13 11:35:49 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-04-14 13:05:35 -0400 |
commit | 2e3a84b15afb749fbbfd05d765badb53434188b0 (patch) | |
tree | 9c58550ef11c48c32bf85133dde7c00f69827ad2 | |
parent | b49bb451d25ec11535282ca80a6f0be127fb6107 (diff) |
check whether a source with the same path exists in session list not just on disk.
This is intended to catch a potential wierd condition where a source exists as a stub, but has not yet been written to disk,
and then a new source is created with the same path. Currently it is not understood how/when this might happen
-rw-r--r-- | libs/ardour/session.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index bf911c3253..c9e0068431 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -3469,6 +3469,13 @@ Session::new_audio_source_name (const string& base, uint32_t nchan, uint32_t cha existing++; break; } + + string possible_path = Glib::build_filename (spath, buf); + + if (source_by_path (possible_path)) { + existing++; + break; + } } if (existing == 0) { |