summaryrefslogtreecommitdiff
path: root/libs/ardour/session.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-04-14 03:03:35 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2014-04-14 03:03:35 -0400
commit5764970709f15e85ec30c9cea89c318eb8114c58 (patch)
tree0e3ea92a0c26c3582ca31be5e9c48c3b4218aff4 /libs/ardour/session.cc
parent062dd5b71d4aad9e8e83d51bf9277293cddaa2c2 (diff)
more work on linking file existence and removability
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)) {