From: Corinna Vinschen Date: Thu, 6 Mar 2008 10:16:07 +0000 (+0000) Subject: * fhandler.cc (fhandler_base::open_): Add missing test for O_CREAT. X-Git-Tag: sid-snapshot-20080401~78 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=1b16e9d89c81ad0c8962ac472c4e98745611e04d;p=newlib-cygwin.git * fhandler.cc (fhandler_base::open_): Add missing test for O_CREAT. Fix comment. --- diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index ee4695d59..7689bb739 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2008-03-06 Corinna Vinschen + + * fhandler.cc (fhandler_base::open_): Add missing test for O_CREAT. + Fix comment. + 2008-03-05 Corinna Vinschen * child_info.h (~child_info_spawn): Check moreinfo->myself_pinfo for 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