From 9ddfe5a04a1544bdceadc4f3b0256b21698bca9a Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 5 Apr 2001 20:43:23 +0000 Subject: * syscalls.cc (stat_worker): Fix conditional which still allowed successful stat'ing of non-existant files. --- winsup/cygwin/syscalls.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/syscalls.cc') diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 79eb62f75..0244ec8b8 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -1084,8 +1084,8 @@ stat_worker (const char *caller, const char *name, struct stat *buf, goto done; } } - if (atts != -1 || (!oret && get_errno () != ENOENT - && get_errno () != ENOSHARE)) + if (atts != -1 && (oret || (!oret && get_errno () != ENOENT + && get_errno () != ENOSHARE))) { /* Unfortunately, the above open may fail if the file exists, though. So we have to care for this case here, too. */ -- cgit v1.2.3