diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index b0c9c50c3..aeee8fe4d 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -335,6 +335,9 @@ fhandler_base::device_access_denied (int flags) { int mode = 0; + if (flags & O_PATH) + return false; + if (flags & O_RDWR) mode |= R_OK | W_OK; if (flags & (O_WRONLY | O_APPEND))