From 3ace1da676318a591ee314b784f37661e52cfb75 Mon Sep 17 00:00:00 2001 From: Pierre Humblet Date: Fri, 20 Dec 2002 01:48:22 +0000 Subject: [PATCH] 2002-12-19 Pierre Humblet * fhandler.cc (fhandler_base::open): Use "flags" rather than "mode" in Win9X directory code. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/fhandler.cc | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 5e2643ca7..0fd925de9 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2002-12-19 Pierre Humblet + + * fhandler.cc (fhandler_base::open): Use "flags" rather than "mode" + in Win9X directory code. + 2002-12-19 Steve Osborn * fhandler.h (line_edit_status): Add a new element. diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index f73b8baf4..b9d6a1236 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -463,9 +463,9 @@ fhandler_base::open (path_conv *pc, int flags, mode_t mode) { if (!wincap.can_open_directories () && pc && pc->isdir ()) { - if (mode & (O_CREAT | O_EXCL) == (O_CREAT | O_EXCL)) + if (flags & (O_CREAT | O_EXCL) == (O_CREAT | O_EXCL)) set_errno (EEXIST); - else if (mode & (O_WRONLY | O_RDWR)) + else if (flags & (O_WRONLY | O_RDWR)) set_errno (EISDIR); else set_nohandle (true);