From b8670a4764a891c1bd77e7486d89c2b0ab48027d Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sat, 28 Jan 2006 13:59:39 +0000 Subject: [PATCH] * fhandler_disk_file.cc (fhandler_disk_file::mkdir): In case or error, check for existance explicitely and set errno to EEXIST. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/fhandler_disk_file.cc | 2 ++ 2 files changed, 7 insertions(+) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 21eb751bc..82dcaebb7 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2006-01-28 Corinna Vinschen + + * fhandler_disk_file.cc (fhandler_disk_file::mkdir): In case or error, + check for existance explicitely and set errno to EEXIST. + 2006-01-28 Corinna Vinschen * fhandler_disk_file.cc (DIR_NUM_ENTRIES): New define determining diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index 54b2f17f6..e6adca261 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -1257,6 +1257,8 @@ fhandler_disk_file::mkdir (mode_t mode) #endif res = 0; } + else if (pc.exists ()) + set_errno (EEXIST); else __seterrno ();