From 6d66f90c5c143a6c584629e495e925b4fcf7767f Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 22 Oct 2011 21:46:53 +0000 Subject: [PATCH] Use correct sources_root even when sessions are loaded from inside a session folder, specifying only their .ardour filename (#4032). git-svn-id: svn://localhost/ardour2/branches/3.0@10285 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/session_directory.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libs/ardour/session_directory.cc b/libs/ardour/session_directory.cc index 36a01fb77d..9653a15ae1 100644 --- a/libs/ardour/session_directory.cc +++ b/libs/ardour/session_directory.cc @@ -94,7 +94,13 @@ SessionDirectory::old_sound_path () const const path SessionDirectory::sources_root () const { - const string legalized_root(legalize_for_path(m_root_path.leaf())); + path p = m_root_path; + + if (p.leaf() == ".") { + p = PBD::sys::get_absolute_path (m_root_path); + } + + const string legalized_root (legalize_for_path (p.leaf ())); return m_root_path / interchange_dir_name / legalized_root; }