diff options
author | Josh Blum <josh@joshknows.com> | 2012-06-05 17:43:39 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2012-06-05 17:59:44 -0700 |
commit | 98074d0c29e818f3aa08edf451f4e7351116deae (patch) | |
tree | 8f5274de68f258476f47446d060fa0d8312a73b4 /host/lib/utils/paths.cpp | |
parent | b216f715bc69a624e985021655ee1922b04adb3d (diff) | |
download | uhd-98074d0c29e818f3aa08edf451f4e7351116deae.tar.gz uhd-98074d0c29e818f3aa08edf451f4e7351116deae.tar.bz2 uhd-98074d0c29e818f3aa08edf451f4e7351116deae.zip |
uhd: added uhd::get_pkg_data_path
Diffstat (limited to 'host/lib/utils/paths.cpp')
-rw-r--r-- | host/lib/utils/paths.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/host/lib/utils/paths.cpp b/host/lib/utils/paths.cpp index 43094521a..26fa6d1c7 100644 --- a/host/lib/utils/paths.cpp +++ b/host/lib/utils/paths.cpp @@ -71,19 +71,20 @@ static std::vector<fs::path> get_env_paths(const std::string &var_name){ /*********************************************************************** * Get a list of special purpose paths **********************************************************************/ -static fs::path get_uhd_pkg_data_path(void){ - return fs::path(get_env_var("UHD_PKG_DATA_PATH", UHD_PKG_DATA_PATH)); +std::string uhd::get_pkg_data_path(void) +{ + return get_env_var("UHD_PKG_DATA_PATH", UHD_PKG_DATA_PATH); } std::vector<fs::path> get_image_paths(void){ std::vector<fs::path> paths = get_env_paths("UHD_IMAGE_PATH"); - paths.push_back(get_uhd_pkg_data_path() / "images"); + paths.push_back(fs::path(uhd::get_pkg_data_path()) / "images"); return paths; } std::vector<fs::path> get_module_paths(void){ std::vector<fs::path> paths = get_env_paths("UHD_MODULE_PATH"); - paths.push_back(get_uhd_pkg_data_path() / "modules"); + paths.push_back(fs::path(uhd::get_pkg_data_path()) / "modules"); return paths; } |