aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/fluxbox-update_configs.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/util/fluxbox-update_configs.cc b/util/fluxbox-update_configs.cc
index fcb9bc2..85bbbfe 100644
--- a/util/fluxbox-update_configs.cc
+++ b/util/fluxbox-update_configs.cc
@@ -22,6 +22,7 @@
22#include "../src/FbTk/I18n.hh" 22#include "../src/FbTk/I18n.hh"
23#include "../src/FbTk/Resource.hh" 23#include "../src/FbTk/Resource.hh"
24#include "../src/FbTk/StringUtil.hh" 24#include "../src/FbTk/StringUtil.hh"
25#include "../src/FbTk/FileUtil.hh"
25 26
26#include "defaults.hh" 27#include "defaults.hh"
27 28
@@ -473,11 +474,9 @@ string read_file(const string& filename) {
473 if (it != file_cache.end()) 474 if (it != file_cache.end())
474 return it->second; 475 return it->second;
475 476
476 struct stat s; 477 if (!FbTk::FileUtil::isRegularFile(filename.c_str())) {
477 stat(filename.c_str(), &s);
478
479 if (! (s.st_mode & S_IFREG))
480 return ""; 478 return "";
479 }
481 480
482 // nope, we'll have to read the file 481 // nope, we'll have to read the file
483 ifstream infile(filename.c_str()); 482 ifstream infile(filename.c_str());