Add check for file existence in linux_access function

This commit is contained in:
EnderIce2 2024-03-20 17:37:20 +02:00
parent 717a98810a
commit a5ca3b3995
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD

View File

@ -567,6 +567,11 @@ static int linux_access(SysFrm *, const char *pathname, int mode)
if (pPathname == nullptr) if (pPathname == nullptr)
return -EFAULT; return -EFAULT;
debug("access(%s, %d)", (char *)pPathname, mode);
if (!fs->PathExists(pPathname, pcb->CurrentWorkingDirectory))
return -ENOENT;
stub; stub;
fixme("access(%s, %d)", (char *)pPathname, mode); fixme("access(%s, %d)", (char *)pPathname, mode);
return 0; return 0;