summaryrefslogtreecommitdiff
path: root/libs/ardour/import.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-05-29 16:27:33 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2014-05-29 16:27:41 -0400
commitbe575b7945eace2755960fe85145e445f9a9cf6c (patch)
tree44342ebec97caeac288bca1d8c8833ac2e4482af /libs/ardour/import.cc
parentc6930c1aef2102dd3872ff12629358aae9f28132 (diff)
fix data loss/file deletion caused by mistaken used of Session::source_by_path() to check if an AUDIO filesource with a given path already exists.
::source_by_path() was written for MIDI files only. I fixed the call and renamed the two similar functions (one for audio and one for MIDI) to make it more clear.
Diffstat (limited to 'libs/ardour/import.cc')
-rw-r--r--libs/ardour/import.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/ardour/import.cc b/libs/ardour/import.cc
index b66f354224..3ab46bfec5 100644
--- a/libs/ardour/import.cc
+++ b/libs/ardour/import.cc
@@ -202,7 +202,7 @@ map_existing_mono_sources (const vector<string>& new_paths, Session& /*sess*/,
for (vector<string>::const_iterator i = new_paths.begin();
i != new_paths.end(); ++i)
{
- boost::shared_ptr<Source> source = session->source_by_path_and_channel(*i, 0);
+ boost::shared_ptr<Source> source = session->audio_source_by_path_and_channel(*i, 0);
if (source == 0) {
error << string_compose(_("Could not find a source for %1 even though we are updating this file!"), (*i)) << endl;