From 2e3a84b15afb749fbbfd05d765badb53434188b0 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 13 Apr 2014 11:35:49 -0400 Subject: 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 --- libs/ardour/session.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libs/ardour/session.cc') 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) { -- cgit v1.2.3