Browse Source

Fix possible error handling issue with errno

fixes
Antonio SJ Musumeci 3 days ago
parent
commit
ec5287eeef
  1. 2
      src/config.cpp

2
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;
}

Loading…
Cancel
Save