* fhandler.cc (fhandler_base::open_): Add missing test for O_CREAT.

Fix comment.
This commit is contained in:
Corinna Vinschen 2008-03-06 10:16:07 +00:00
parent 9ab254e09b
commit 1b16e9d89c
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2008-03-06 Corinna Vinschen <corinna@vinschen.de>
* fhandler.cc (fhandler_base::open_): Add missing test for O_CREAT.
Fix comment.
2008-03-05 Corinna Vinschen <corinna@vinschen.de>
* child_info.h (~child_info_spawn): Check moreinfo->myself_pinfo for

View File

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