Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2001-04-06 00:43:23 +0400
committerCorinna Vinschen <corinna@vinschen.de>2001-04-06 00:43:23 +0400
commit9ddfe5a04a1544bdceadc4f3b0256b21698bca9a (patch)
tree62f203fd25f808508606f3404fdcc9a1b2854e73
parentb25c2ad730a2600e08d2d505ff62dc371e6038c8 (diff)
* syscalls.cc (stat_worker): Fix conditional which still allowed
successful stat'ing of non-existant files.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/syscalls.cc4
2 files changed, 7 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index a89f1f4d6..c7537da97 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+Thu Apr 5 22:41:00 2001 Corinna Vinschen <corinna@vinschen.de>
+
+ * syscalls.cc (stat_worker): Fix conditional which still allowed
+ successful stat'ing of non-existant files.
+
Wed Apr 4 10:37:44 2001 Christopher Faylor <cgf@cygnus.com>
* child_info.h: Bump magic number for fork/exec/spawn.
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. */