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.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index 5c613bccd..973a1c19b 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -308,7 +308,11 @@ fhandler_base::open (int flags, mode_t mode)
goto done;
}
- if (get_device () == FH_TAPE)
+ if (get_query_open ())
+ {
+ access = 0;
+ }
+ else if (get_device () == FH_TAPE)
{
access = GENERIC_READ | GENERIC_WRITE;
}