diff options
Diffstat (limited to 'winsup/cygwin/fhandler.cc')
-rw-r--r-- | winsup/cygwin/fhandler.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index fccbb361e..ffb67b6cc 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -442,7 +442,7 @@ fhandler_base::open (path_conv *pc, int flags, mode_t mode) if (x == INVALID_HANDLE_VALUE) { - if (pc->isdir () && !wincap.can_open_directories ()) + if (!wincap.can_open_directories () && pc && pc->isdir ()) { if (mode & (O_CREAT | O_EXCL) == (O_CREAT | O_EXCL)) set_errno (EEXIST); |