diff options
author | Tom Rondeau | 2013-02-17 20:15:25 -0500 |
---|---|---|
committer | Tom Rondeau | 2013-02-17 20:15:25 -0500 |
commit | 38447cf7eabfdc02d2b75b01bca57b3350d23709 (patch) | |
tree | 8ae69552aab706687420bd04093f85ba10f92997 /gnuradio-core/src/lib | |
parent | f0bcceb462fda30371d83babb254e991f73f237e (diff) | |
download | gnuradio-38447cf7eabfdc02d2b75b01bca57b3350d23709.tar.gz gnuradio-38447cf7eabfdc02d2b75b01bca57b3350d23709.tar.bz2 gnuradio-38447cf7eabfdc02d2b75b01bca57b3350d23709.zip |
core: if the config files don't exist, just return an empty list; don't fail.
Diffstat (limited to 'gnuradio-core/src/lib')
-rw-r--r-- | gnuradio-core/src/lib/general/gr_prefs.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gnuradio-core/src/lib/general/gr_prefs.cc b/gnuradio-core/src/lib/general/gr_prefs.cc index c192e25be..37ca7c6f3 100644 --- a/gnuradio-core/src/lib/general/gr_prefs.cc +++ b/gnuradio-core/src/lib/general/gr_prefs.cc @@ -65,11 +65,12 @@ gr_prefs::~gr_prefs() std::vector<std::string> gr_prefs::_sys_prefs_filenames() { + std::vector<std::string> fnames; + fs::path dir = gr_prefsdir(); if(!fs::is_directory(dir)) - std::runtime_error("gr_prefs: preference path does not exist.\n"); + return fnames; - std::vector<std::string> fnames; fs::directory_iterator diritr(dir); while(diritr != fs::directory_iterator()) { fs::path p = *diritr++; |