summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_audio_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 /gtk2_ardour/editor_audio_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 'gtk2_ardour/editor_audio_import.cc')
-rw-r--r--gtk2_ardour/editor_audio_import.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_audio_import.cc b/gtk2_ardour/editor_audio_import.cc
index da70df5c15..dd706496e3 100644
--- a/gtk2_ardour/editor_audio_import.cc
+++ b/gtk2_ardour/editor_audio_import.cc
@@ -611,7 +611,7 @@ Editor::embed_sndfiles (vector<string> paths, bool multifile,
boost::shared_ptr<Source> s;
- if ((s = _session->source_by_path_and_channel (path, n)) == 0) {
+ if ((s = _session->audio_source_by_path_and_channel (path, n)) == 0) {
source = boost::dynamic_pointer_cast<AudioFileSource> (
SourceFactory::createExternal (DataType::AUDIO, *_session,