aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2017-11-14 21:50:32 +0100
committerCorinna Vinschen <corinna@vinschen.de>2017-11-14 21:50:32 +0100
commit0d57ef9de5e2e5b12694169ab0a3c4203e1aa605 (patch)
treee470e96113e2c9d71915e44582e294a522a89d5e
parent0b0b2b96f2039403e456b1c84f6300cdef0696c0 (diff)
downloadnewlib-0d57ef9de5e2e5b12694169ab0a3c4203e1aa605.zip
newlib-0d57ef9de5e2e5b12694169ab0a3c4203e1aa605.tar.gz
newlib-0d57ef9de5e2e5b12694169ab0a3c4203e1aa605.tar.bz2
Cygwin: open: Remove unused code to handle HIDDEN and SYSTEM files
Commit 603ef545bdbdbf7495e1a0bbabffb8741fc2a5bb broke this snippet and commit 5b312b4747cc4acda39c187369c02fcea456513b didn't help at all since FILE_CREATE is exactly *not* the situation the test was originally supposed to handle. In fact, none of the open flags used by fhandler_base::open actually hits this problem anymore, so just drop the code. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r--winsup/cygwin/fhandler.cc8
1 files changed, 0 insertions, 8 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index 7e8f509..7da1c4e 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -626,14 +626,6 @@ fhandler_base::open (int flags, mode_t mode)
}
}
- /* Trying to overwrite an already existing file with FILE_ATTRIBUTE_HIDDEN
- and/or FILE_ATTRIBUTE_SYSTEM attribute set, NtCreateFile fails with
- STATUS_ACCESS_DENIED. Per MSDN you have to create the file with the
- same attributes as already specified for the file. */
- if (create_disposition == FILE_CREATE
- && has_attribute (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM))
- file_attributes |= pc.file_attributes ();
-
if (flags & (O_CREAT | O_TMPFILE))
{
file_attributes |= FILE_ATTRIBUTE_NORMAL;