summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_audio_import.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-06-25 20:46:39 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-06-25 20:46:39 +0000
commit8e7a5d77414a40550a28d61abf6eeb1e89a1ec25 (patch)
tree76d5851fe7221066ccadbc032a9a1fbcd1b6091b /gtk2_ardour/editor_audio_import.cc
parent94880f7cd1417031387b485e279c32eea885cf6d (diff)
startup assistant patch from tinman; cleanup fix backported from 2.X ; easy(ier) ways to create aux sends ; facility to subgroup (route via bus) for a route group ; fix up internal send/return operation ; fix internal send naming since it doesn't need to be unique - no JACK ports involved
git-svn-id: svn://localhost/ardour2/branches/3.0@5272 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_audio_import.cc')
-rw-r--r--gtk2_ardour/editor_audio_import.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_audio_import.cc b/gtk2_ardour/editor_audio_import.cc
index 1c23fdf217..7762a42322 100644
--- a/gtk2_ardour/editor_audio_import.cc
+++ b/gtk2_ardour/editor_audio_import.cc
@@ -559,6 +559,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 ();
@@ -571,6 +572,8 @@ Editor::embed_sndfiles (vector<Glib::ustring> paths, bool multifile,
sys::path tmp = session->session_directory().sound_path() / Glib::path_get_basename(path);
linked_path = tmp.to_string();
+
+ path_to_use = linked_path;
if (link (path.c_str(), linked_path.c_str()) == 0) {
@@ -581,6 +584,7 @@ Editor::embed_sndfiles (vector<Glib::ustring> paths, bool multifile,
*/
path = linked_path;
+ path_to_use = Glib::path_get_basename (path);
} else {
@@ -592,6 +596,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 (path);
}
}
}
@@ -673,7 +678,7 @@ Editor::embed_sndfiles (vector<Glib::ustring> paths, bool multifile,
source = boost::dynamic_pointer_cast<AudioFileSource> (
SourceFactory::createReadable (DataType::AUDIO, *session,
- path, false, n,
+ path_to_use, false, n,
(mode == ImportAsTapeTrack
? Source::Destructive
: Source::Flag (0)),