mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-25 18:40:18 -04:00
Fix possible error handling issue with errno
This commit is contained in:
parent
73c917b728
commit
9e3e4b690d
1 changed files with 2 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue