diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-12-04 21:08:34 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-12-04 21:08:34 +0000 |
commit | af768c74290a0b2615846a19fcaac30fa3d3712a (patch) | |
tree | 75464eac0266d91ddda3fc7c850b2411859524e5 /libs | |
parent | 30f75c446e09f0aaa93ed73ed6e32332eda52735 (diff) |
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
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/control_protocol_search_path.cc | 14 | ||||
-rw-r--r-- | libs/ardour/export_formats_search_path.cc | 7 | ||||
-rw-r--r-- | libs/ardour/panner_search_path.cc | 12 |
3 files changed, 16 insertions, 17 deletions
diff --git a/libs/ardour/control_protocol_search_path.cc b/libs/ardour/control_protocol_search_path.cc index c7c9b635a3..345989277b 100644 --- a/libs/ardour/control_protocol_search_path.cc +++ b/libs/ardour/control_protocol_search_path.cc @@ -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; } diff --git a/libs/ardour/export_formats_search_path.cc b/libs/ardour/export_formats_search_path.cc index b35d3098f0..39ccb0de13 100644 --- a/libs/ardour/export_formats_search_path.cc +++ b/libs/ardour/export_formats_search_path.cc @@ -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; diff --git a/libs/ardour/panner_search_path.cc b/libs/ardour/panner_search_path.cc index cbb62bbf3c..257f9d0c78 100644 --- a/libs/ardour/panner_search_path.cc +++ b/libs/ardour/panner_search_path.cc @@ -34,18 +34,18 @@ namespace ARDOUR { SearchPath panner_search_path () { + 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) { - return spath_env; + spath += spath_env; } - SearchPath spath (user_config_directory ()); - - spath += ardour_module_directory (); - spath.add_subdirectory_to_paths(panner_dir_name); - return spath; } |