Fix possible error handling issue with errno

This commit is contained in:
Antonio SJ Musumeci 2026-03-13 16:38:18 -05:00
parent 73c917b728
commit 9e3e4b690d

View file

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