13
0

be consistent in the way we merge environment-set search paths and pre-defined ones

git-svn-id: svn://localhost/ardour2/branches/3.0@10890 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2011-12-04 21:08:34 +00:00
parent 30f75c446e
commit af768c7429
3 changed files with 17 additions and 18 deletions

View File

@ -34,18 +34,18 @@ namespace ARDOUR {
SearchPath
control_protocol_search_path ()
{
bool surfaces_path_defined = false;
SearchPath spath_env (Glib::getenv(surfaces_env_variable_name, surfaces_path_defined));
if (surfaces_path_defined) {
return spath_env;
}
SearchPath spath (user_config_directory ());
spath += ardour_module_directory ();
spath.add_subdirectory_to_paths (surfaces_dir_name);
bool surfaces_path_defined = false;
SearchPath spath_env (Glib::getenv(surfaces_env_variable_name, surfaces_path_defined));
if (surfaces_path_defined) {
spath += spath_env;
}
return spath;
}

View File

@ -35,17 +35,16 @@ namespace ARDOUR {
SearchPath
export_formats_search_path ()
{
bool export_path_defined = false;
SearchPath spath;
spath = user_config_directory ();
spath.add_subdirectory_to_paths (export_formats_dir_name);
std::string env_var = Glib::getenv (export_env_variable_name, export_path_defined);
bool export_path_defined = false;
SearchPath spath_env = Glib::getenv (export_env_variable_name, export_path_defined);
if (export_path_defined) {
sys::path p = env_var;
spath += p;
spath += spath_env;
}
return spath;

View File

@ -34,18 +34,18 @@ namespace ARDOUR {
SearchPath
panner_search_path ()
{
bool panner_path_defined = false;
SearchPath spath_env (Glib::getenv(panner_env_variable_name, panner_path_defined));
if (panner_path_defined) {
return spath_env;
}
SearchPath spath (user_config_directory ());
spath += ardour_module_directory ();
spath.add_subdirectory_to_paths(panner_dir_name);
bool panner_path_defined = false;
SearchPath spath_env (Glib::getenv(panner_env_variable_name, panner_path_defined));
if (panner_path_defined) {
spath += spath_env;
}
return spath;
}