Cygwin: path_conv::check: handle error from fhandler_process::exists

fhandler_process::exists is called when we are checking a path
starting with "/proc/<pid>/fd".  If it returns virt_none and sets an
errno, there is no need for further checking.  Just set 'error' and
return.
This commit is contained in:
Ken Brown 2020-09-08 12:23:32 -04:00
parent 58cc67d653
commit 6775ac8cb5
1 changed files with 9 additions and 0 deletions

View File

@ -809,6 +809,15 @@ path_conv::check (const char *src, unsigned opt,
delete fh;
goto retry_fs_via_processfd;
}
else if (file_type == virt_none && dev == FH_PROCESSFD)
{
error = get_errno ();
if (error)
{
delete fh;
return;
}
}
delete fh;
}
switch (file_type)