From b8a7c23a2a0b89aa703a457c285785d2529af666 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 8 Jun 2000 13:56:28 +0000 Subject: [PATCH] * fhandler.cc (fhandler_disk_file::open): Check for directory to set O_DIROPEN on directories anyway. --- winsup/cygwin/ChangeLog | 9 +++++++-- winsup/cygwin/fhandler.cc | 4 ++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 389e562df..84eb720bc 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,6 +1,11 @@ +Thu Jun 8 15:53:00 2000 Corinna Vinschen + + * fhandler.cc (fhandler_disk_file::open): Check for directory + to set O_DIROPEN on directories anyway. + 2000-06-07 Kazuhiro Fujieda - path.cc (mount_info::init): Eliminate the mount_slash feature. + * path.cc (mount_info::init): Eliminate the mount_slash feature. (mount_slash): Eliminated. (mount_info::read_mounts): Eliminate looking up existing entries. The loop for deleting cygpath entries is done only when such entries exist. @@ -13,7 +18,7 @@ (mount_info::to_registry): Eliminated. (mount_info::from_v1_registry): Eliminated. (cygwin_umount): Simply call del_item. - shared.h: Modify the declaration of add_item and del_item. Remove the + * shared.h: Modify the declaration of add_item and del_item. Remove the declaration of from_v1_registry. Wed Jun 7 23:56:10 2000 Christopher Faylor diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index 609d1023b..17f2db194 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -1181,6 +1181,10 @@ fhandler_disk_file::open (path_conv& real_path, int flags, mode_t mode) set_has_acls (real_path.has_acls ()); + if (real_path.file_attributes () != (DWORD)-1 + && (real_path.file_attributes () & FILE_ATTRIBUTE_DIRECTORY)) + flags |= O_DIROPEN; + int res = this->fhandler_base::open (flags, mode); if (!res)