summaryrefslogtreecommitdiff
path: root/libs/ardour/session_directory.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-10-22 21:46:53 +0000
committerCarl Hetherington <carl@carlh.net>2011-10-22 21:46:53 +0000
commit6d66f90c5c143a6c584629e495e925b4fcf7767f (patch)
treec7e59a22659422a6b76d53624c5a1b14b4eed28e /libs/ardour/session_directory.cc
parent4c2f9dd11b48b3fc5ae532fe3457dd844b7df3e8 (diff)
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
Diffstat (limited to 'libs/ardour/session_directory.cc')
-rw-r--r--libs/ardour/session_directory.cc8
1 files changed, 7 insertions, 1 deletions
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;
}