aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/utils
diff options
context:
space:
mode:
authorAshish Chaudhari <ashish@ettus.com>2015-02-11 16:33:58 -0800
committerAshish Chaudhari <ashish@ettus.com>2015-02-11 16:33:58 -0800
commitec7eedcca8418970e081b4875c2d5c147611025b (patch)
tree6de14c745f93342fd4717c191a62a0478ab9a919 /host/lib/utils
parentac958d47e8c7c4e0ee6a010d3e5a592d392e9206 (diff)
parent08267a8c0264e08fe6631ce2ede0ec2c2933463f (diff)
downloaduhd-ec7eedcca8418970e081b4875c2d5c147611025b.tar.gz
uhd-ec7eedcca8418970e081b4875c2d5c147611025b.tar.bz2
uhd-ec7eedcca8418970e081b4875c2d5c147611025b.zip
Merge branch 'bhilburn/uhdcalibpath' into maint
Diffstat (limited to 'host/lib/utils')
-rw-r--r--host/lib/utils/paths.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/host/lib/utils/paths.cpp b/host/lib/utils/paths.cpp
index 4a95431b8..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();
}