diff --git a/src/config.cpp b/src/config.cpp index 6bddbc8d..b0e8775b 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -471,9 +471,11 @@ Config::from_file(const std::string &filepath_) int rv; std::ifstream ifstrm; + errno = 0; ifstrm.open(filepath_); if(!ifstrm.good()) { + errno = errno ? errno : EIO; errs.push_back({errno,filepath_}); return -errno; }