From 062dd5b71d4aad9e8e83d51bf9277293cddaa2c2 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 13 Apr 2014 11:35:49 -0400 Subject: [PATCH] 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(+) diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index f0672b934e..6f93dafd6b 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) {