From 40937e619fd962bda85dc73cbce2b9820c956ed8 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Sun, 17 Jun 2007 00:46:18 +0000 Subject: [PATCH] Use Session::session_directory and sys::path in Editor::embed_sndfile to create a path in a portable fashion git-svn-id: svn://localhost/ardour2/trunk@2000 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/editor_audio_import.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gtk2_ardour/editor_audio_import.cc b/gtk2_ardour/editor_audio_import.cc index 2c0395f03f..6254cadab6 100644 --- a/gtk2_ardour/editor_audio_import.cc +++ b/gtk2_ardour/editor_audio_import.cc @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -293,10 +294,11 @@ Editor::embed_sndfile (vector paths, bool split, bool multiple_fi ustring path = *p; /* lets see if we can link it into the session */ - - linked_path = session->sound_dir(); - linked_path += '/'; - linked_path += Glib::path_get_basename (path); + + sys::path tmp = session->session_directory().sound_path(); + + tmp /= Glib::path_get_basename(path); + linked_path = tmp.to_string(); if (link (path.c_str(), linked_path.c_str()) == 0) {