X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fsession_directory.cc;h=1a2b476cad5df8d6c6db74c5e76f2b01beabe56b;hb=1059b3f48e568b60d5e248d94fbb9110a2dd1a16;hp=fcdaed3a29c93b6b2c9437e01b2296d9bdc47ac5;hpb=2a7b23d51553b68c5d0ac28e68307e041feceb8a;p=ardour.git diff --git a/libs/ardour/session_directory.cc b/libs/ardour/session_directory.cc index fcdaed3a29..1a2b476cad 100644 --- a/libs/ardour/session_directory.cc +++ b/libs/ardour/session_directory.cc @@ -22,6 +22,7 @@ #include #include +#include #include "i18n.h" @@ -85,20 +86,27 @@ SessionDirectory::old_sound_path () const return m_root_path / old_sound_dir_name; } +const path +SessionDirectory::sources_root () const +{ + const string legalized_root(legalize_for_path(m_root_path.leaf())); + + return m_root_path / interchange_dir_name / legalized_root; +} + const path SessionDirectory::sound_path () const { if(is_directory (old_sound_path ())) return old_sound_path(); // the new style sound directory - return m_root_path / interchange_dir_name / m_root_path.leaf() / sound_dir_name; + return sources_root() / sound_dir_name; } const path SessionDirectory::midi_path () const { - // the new style sound directory - return m_root_path / interchange_dir_name / m_root_path.leaf() / midi_dir_name; + return sources_root() / midi_dir_name; } const path