summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler.cc
diff options
context:
space:
mode:
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 75711260b..7acbfb17a 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -544,7 +544,7 @@ fhandler_base::open (int flags, mode_t mode)
if (pc.is_rep_symlink ())
create_options |= FILE_OPEN_REPARSE_POINT;
- if (flags & O_CREAT)
+ if ((flags & O_CREAT) || create_disposition == FILE_OVERWRITE)
{
file_attributes = FILE_ATTRIBUTE_NORMAL;
/* If mode has no write bits set, we set the R/O attribute. */