Fix possible error handling issue with errno

This commit is contained in:
Antonio SJ Musumeci 2026-03-13 16:38:18 -05:00 • committed by trapexit
parent c45c5ce920
commit bf98d3f3a6

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