diff options
author | Marcus Müller <marcus.mueller@ettus.com> | 2016-05-07 17:14:49 +0200 |
---|---|---|
committer | Marcus Müller <marcus.mueller@ettus.com> | 2016-05-07 17:14:49 +0200 |
commit | 438fb307a0b593706a212a3cd6e16f217a8704d0 (patch) | |
tree | 2d8c41697fec83e9ea3274ecf1133be7bec8a225 /gnuradio-runtime/lib/sys_paths.cc | |
parent | 6aa995a5477feea1b6f9ef1f49c3045c25d147b1 (diff) |
added user settings directory as a gr::-accessible path
* removing a bit of "magic paths" in prefs.cc
* added constant
Diffstat (limited to 'gnuradio-runtime/lib/sys_paths.cc')
-rw-r--r-- | gnuradio-runtime/lib/sys_paths.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gnuradio-runtime/lib/sys_paths.cc b/gnuradio-runtime/lib/sys_paths.cc index 64853c68b2..3bf6697bac 100644 --- a/gnuradio-runtime/lib/sys_paths.cc +++ b/gnuradio-runtime/lib/sys_paths.cc @@ -23,6 +23,8 @@ #include <cstdlib> //getenv #include <cstdio> //P_tmpdir (maybe) +#include <boost/filesystem/path.hpp> + namespace gr { const char *tmp_path() @@ -62,4 +64,11 @@ namespace gr { return tmp_path(); } + const char *userconf_path() + { + boost::filesystem::path p(appdata_path()); + p = p / ".gnuradio"; + return p.c_str(); + } + } /* namespace gr */ |