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>2013-05-21 14:04:45 +0400
committerCorinna Vinschen <corinna@vinschen.de>2013-05-21 14:04:45 +0400
commit676548b3d1c6e15981c6ddb7dfca483d6ec910ec (patch)
treed35db7a90179303f0ff1ab5c8a8c982cf4995980
parent649619b56d2452bcb88fecee67aee2d08dce00e8 (diff)
* syscalls.cc (open): Only return ENOTDIR if file exists.
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/syscalls.cc2
2 files changed, 5 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 3b685861f..048b3c25c 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,7 @@
+2013-05-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * syscalls.cc (open): Only return ENOTDIR if file exists.
+
2013-05-16 Christopher Faylor <me.cygwin2013@cgf.cx>
* sigproc.cc (sig_hold): Delete.
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index a8ca9efab..e1886e617 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -1360,7 +1360,7 @@ open (const char *unix_path, int flags, ...)
res = -1;
set_errno (ELOOP);
}
- else if ((flags & O_DIRECTORY) && !fh->pc.isdir ())
+ else if ((flags & O_DIRECTORY) && fh->exists () && !fh->pc.isdir ())
{
delete fh;
res = -1;