diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2007-06-27 12:12:28 +0000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2007-06-27 12:12:28 +0000 |
commit | bbc289dbe3d6d9894c5db2d7a362409ae8a25578 (patch) | |
tree | 2ac7e393249e190d1335807d8233dcf1fd031f44 /libs/ardour/filesystem_paths.cc | |
parent | c37a944b15d67c1c4287c29647172f1ac54f1dee (diff) |
Add ARDOUR::ardour_search_path that contains the directories in the ARDOUR_PATH environment variable.
Rename ARDOUR::config_search_path to ARDOUR::system_config_search_path
Use PBD::find_file_in_search_path in Configuration::load_state
git-svn-id: svn://localhost/ardour2/trunk@2054 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/filesystem_paths.cc')
-rw-r--r-- | libs/ardour/filesystem_paths.cc | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/libs/ardour/filesystem_paths.cc b/libs/ardour/filesystem_paths.cc index e41b9954cf..69b00393a8 100644 --- a/libs/ardour/filesystem_paths.cc +++ b/libs/ardour/filesystem_paths.cc @@ -27,10 +27,6 @@ #define WITH_STATIC_PATHS 1 -namespace { - const char * const config_env_variable_name = "ARDOUR_CONFIG_PATH"; -} - namespace ARDOUR { using std::string; @@ -65,29 +61,28 @@ ardour_module_directory () } SearchPath -config_search_path () +ardour_search_path () { - bool config_path_defined = false; - SearchPath spath_env(Glib::getenv(config_env_variable_name, config_path_defined)); - - if (config_path_defined) - { - return spath_env; - } + SearchPath spath_env(Glib::getenv("ARDOUR_PATH")); + return spath_env; +} +SearchPath +system_config_search_path () +{ #ifdef WITH_STATIC_PATHS - SearchPath spath(string(CONFIG_DIR)); + SearchPath config_path(string(CONFIG_DIR)); #else - SearchPath spath(system_config_directories()); + SearchPath config_path(system_config_directories()); #endif - spath.add_subdirectory_to_paths("ardour2"); + config_path.add_subdirectory_to_paths("ardour2"); - return spath; + return config_path; } } // namespace ARDOUR |