summaryrefslogtreecommitdiff
path: root/libs/ardour/session.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r--libs/ardour/session.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 6f93dafd6b..2aef745961 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -3470,6 +3470,15 @@ Session::new_audio_source_name (const string& base, uint32_t nchan, uint32_t cha
break;
}
+ /* it is possible that we have the path already
+ * assigned to a source that has not yet been written
+ * (ie. the write source for a diskstream). we have to
+ * check this in order to make sure that our candidate
+ * path isn't used again, because that can lead to
+ * two Sources point to the same file with different
+ * notions of their removability.
+ */
+
string possible_path = Glib::build_filename (spath, buf);
if (source_by_path (possible_path)) {