diff options
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/editor_audio_import.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_audio_import.cc b/gtk2_ardour/editor_audio_import.cc index fa946f90c9..1b34d1e2a6 100644 --- a/gtk2_ardour/editor_audio_import.cc +++ b/gtk2_ardour/editor_audio_import.cc @@ -524,6 +524,7 @@ Editor::embed_sndfiles (vector<Glib::ustring> paths, bool multifile, string linked_path; SoundFileInfo finfo; int ret = 0; + Glib::ustring path_to_use; track_canvas->get_window()->set_cursor (Gdk::Cursor (Gdk::WATCH)); gdk_flush (); @@ -537,6 +538,8 @@ Editor::embed_sndfiles (vector<Glib::ustring> paths, bool multifile, linked_path = session->sound_dir(); linked_path += '/'; linked_path += Glib::path_get_basename (path); + + path_to_use = path; if (link (path.c_str(), linked_path.c_str()) == 0) { @@ -547,6 +550,7 @@ Editor::embed_sndfiles (vector<Glib::ustring> paths, bool multifile, */ path = linked_path; + path_to_use = Glib::path_get_basename (linked_path); } else { @@ -558,6 +562,7 @@ Editor::embed_sndfiles (vector<Glib::ustring> paths, bool multifile, if (stat (linked_path.c_str(), &sb) == 0) { if (sb.st_nlink > 1) { // its a hard link, assume its the one we want path = linked_path; + path_to_use = Glib::path_get_basename (linked_path); } } } @@ -638,7 +643,7 @@ Editor::embed_sndfiles (vector<Glib::ustring> paths, bool multifile, if ((s = session->source_by_path_and_channel (path, n)) == 0) { source = boost::dynamic_pointer_cast<AudioFileSource> (SourceFactory::createReadable - (*session, path, n, + (*session, path_to_use, n, (mode == ImportAsTapeTrack ? AudioFileSource::Destructive : AudioFileSource::Flag (0)), |