diff options
author | Martin Braun <martin.braun@ettus.com> | 2015-02-12 11:04:29 +0100 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2015-02-12 11:04:29 +0100 |
commit | 8086c2e32c8a71e3b50c63620a18f63b994628aa (patch) | |
tree | 08247dcad2cb3ba1e4d973be7b50962203e04d93 /host/lib/utils | |
parent | e28d7844b0c9d206bf5b7737a44c22f29e761ec1 (diff) | |
parent | ec7eedcca8418970e081b4875c2d5c147611025b (diff) | |
download | uhd-8086c2e32c8a71e3b50c63620a18f63b994628aa.tar.gz uhd-8086c2e32c8a71e3b50c63620a18f63b994628aa.tar.bz2 uhd-8086c2e32c8a71e3b50c63620a18f63b994628aa.zip |
Merge branch 'maint'
Conflicts:
host/examples/rx_samples_to_file.cpp
Diffstat (limited to 'host/lib/utils')
-rw-r--r-- | host/lib/utils/paths.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/host/lib/utils/paths.cpp b/host/lib/utils/paths.cpp index e304555bd..f29318ddd 100644 --- a/host/lib/utils/paths.cpp +++ b/host/lib/utils/paths.cpp @@ -173,11 +173,14 @@ std::string uhd::get_tmp_path(void){ } std::string uhd::get_app_path(void){ - const char *appdata_path = std::getenv("APPDATA"); - if (appdata_path != NULL) return appdata_path; + const std::string uhdcalib_path = get_env_var("UHD_CONFIG_DIR"); + if (not uhdcalib_path.empty()) return uhdcalib_path; - const char *home_path = std::getenv("HOME"); - if (home_path != NULL) return home_path; + const std::string appdata_path = get_env_var("APPDATA"); + if (not appdata_path.empty()) return appdata_path; + + const std::string home_path = get_env_var("HOME"); + if (not home_path.empty()) return home_path; return uhd::get_tmp_path(); } @@ -348,6 +351,7 @@ std::string uhd::find_image_path(const std::string &image_name, const std::strin } /* If we made it this far, then we didn't find anything. */ + images_dir = "<no images directory located>"; throw uhd::io_error("Could not find path for image: " + image_name + "\n\n" + "Using images directory: " + images_dir |