diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2007-09-05 01:53:51 +0000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2007-09-05 01:53:51 +0000 |
commit | 4997dec4143ef0242aa0e636505bec6bc3aaf7e2 (patch) | |
tree | cf3bfe69a32c2431288d2dce0470fe051f7749a4 /libs/ardour/session_directory.cc | |
parent | 2a7b23d51553b68c5d0ac28e68307e041feceb8a (diff) |
Fix source directory paths so that the session name element is "legalized" and compatible with 2.0
Fixes bug 1854.
git-svn-id: svn://localhost/ardour2/trunk@2418 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_directory.cc')
-rw-r--r-- | libs/ardour/session_directory.cc | 14 |
1 files changed, 11 insertions, 3 deletions
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 <ardour/directory_names.h> #include <ardour/session_directory.h> +#include <ardour/utils.h> #include "i18n.h" @@ -86,19 +87,26 @@ SessionDirectory::old_sound_path () const } 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 |