diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/fluxbox-update_configs.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/util/fluxbox-update_configs.cc b/util/fluxbox-update_configs.cc index 563bada..2dc5eb6 100644 --- a/util/fluxbox-update_configs.cc +++ b/util/fluxbox-update_configs.cc | |||
@@ -221,16 +221,18 @@ int main(int argc, char **argv) { | |||
221 | } | 221 | } |
222 | } | 222 | } |
223 | 223 | ||
224 | if (rc_filename.empty()) | ||
225 | rc_filename = getenv("HOME") + string("/.fluxbox/init"); | ||
226 | |||
224 | FbTk::ResourceManager resource_manager(rc_filename.c_str(),false); | 227 | FbTk::ResourceManager resource_manager(rc_filename.c_str(),false); |
225 | if (rc_filename.empty() || !resource_manager.load(rc_filename.c_str())) { | 228 | if (!resource_manager.load(rc_filename.c_str())) { |
226 | // couldn't load rc file | 229 | // couldn't load rc file |
227 | if (!rc_filename.empty()) { | 230 | cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "Failed trying to read rc file")<<":"<<rc_filename<<endl; |
228 | cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "Failed trying to read rc file")<<":"<<rc_filename<<endl; | 231 | cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFileTrying, "Retrying with", "Retrying rc file loading with (the following file)")<<": "<<DEFAULT_INITFILE<<endl; |
229 | cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFileTrying, "Retrying with", "Retrying rc file loading with (the following file)")<<": ~/.fluxbox/init"<<endl; | 232 | |
230 | } | ||
231 | // couldn't load default rc file, either | 233 | // couldn't load default rc file, either |
232 | if (!resource_manager.load("~/.fluxbox/init")) { | 234 | if (!resource_manager.load(DEFAULT_INITFILE)) { |
233 | cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "")<<": ~/.fluxbox/init"<<endl; | 235 | cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "")<<": "<<DEFAULT_INITFILE<<endl; |
234 | exit(1); // this is a fatal error for us | 236 | exit(1); // this is a fatal error for us |
235 | } | 237 | } |
236 | } | 238 | } |