* syscalls.cc (open): Only return ENOTDIR if file exists.

This commit is contained in:
Corinna Vinschen 2013-05-21 10:04:45 +00:00
parent 649619b56d
commit 676548b3d1
2 changed files with 5 additions and 1 deletions

View File

@ -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.

View File

@ -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;