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>2008-03-06 13:16:07 +0300
committerCorinna Vinschen <corinna@vinschen.de>2008-03-06 13:16:07 +0300
commit1b16e9d89c81ad0c8962ac472c4e98745611e04d (patch)
treec61681c04a5273064a9c5622c3caf32dfa3ceba2 /winsup/cygwin/fhandler.cc
parent9ab254e09b42a59a8d59d25ab5d0220feb486de6 (diff)
* fhandler.cc (fhandler_base::open_): Add missing test for O_CREAT.
Fix comment.
Diffstat (limited to 'winsup/cygwin/fhandler.cc')
-rw-r--r--winsup/cygwin/fhandler.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index 98c48064d..eded21ee8 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -592,7 +592,7 @@ fhandler_base::open (int flags, mode_t mode)
{
/* Trying to create a directory should return EISDIR, not ENOENT. */
PUNICODE_STRING upath = pc.get_nt_native_path ();
- if (status == STATUS_OBJECT_NAME_INVALID
+ if (status == STATUS_OBJECT_NAME_INVALID && (flags & O_CREAT)
&& upath->Buffer[upath->Length / sizeof (WCHAR) - 1] == '\\')
set_errno (EISDIR);
else