From 38447cf7eabfdc02d2b75b01bca57b3350d23709 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Sun, 17 Feb 2013 20:15:25 -0500 Subject: core: if the config files don't exist, just return an empty list; don't fail. --- gnuradio-core/src/lib/general/gr_prefs.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gnuradio-core/src/lib/general') 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 gr_prefs::_sys_prefs_filenames() { + std::vector 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 fnames; fs::directory_iterator diritr(dir); while(diritr != fs::directory_iterator()) { fs::path p = *diritr++; -- cgit