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
This commit is contained in:
parent
2a7b23d515
commit
4997dec414
@ -115,6 +115,13 @@ protected:
|
||||
*/
|
||||
const path old_sound_path () const;
|
||||
|
||||
/**
|
||||
* @return The path to the directory under which source directories
|
||||
* are created for different source types.
|
||||
* i.e root_path()/interchange/session_name
|
||||
*/
|
||||
const path sources_root() const;
|
||||
|
||||
/**
|
||||
* @return a vector containing the fullpath of all subdirectories.
|
||||
*/
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include <ardour/directory_names.h>
|
||||
#include <ardour/session_directory.h>
|
||||
#include <ardour/utils.h>
|
||||
|
||||
#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
|
||||
|
Loading…
Reference in New Issue
Block a user