diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2007-07-27 08:38:00 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2007-07-27 08:38:00 +0000 |
commit | fe7bbe1504adc15d6d9af71a508cc305fb3f04a1 (patch) | |
tree | 44de7a4ab8e3dad9da91b26680fc056a935fc31a /winsup/cygwin/fhandler_disk_file.cc | |
parent | 214c3a1167c25b0696b118e347a78adf813151a9 (diff) | |
download | cygnal-fe7bbe1504adc15d6d9af71a508cc305fb3f04a1.tar.gz cygnal-fe7bbe1504adc15d6d9af71a508cc305fb3f04a1.tar.bz2 cygnal-fe7bbe1504adc15d6d9af71a508cc305fb3f04a1.zip |
* fhandler.h (enum query_state): Drop redundant query_stat_control.
* fhandler.cc (fhandler_base::open): Ditto. Add READ_CONTROL to
access and FILE_OPEN_FOR_BACKUP_INTENT to create_options when opening
for writing. Always set security attributes to avoid calling
has_acls.
* fhandler_disk_file.cc (fhandler_base::fstat_fs): Don't try to
open file twice.
Diffstat (limited to 'winsup/cygwin/fhandler_disk_file.cc')
-rw-r--r-- | winsup/cygwin/fhandler_disk_file.cc | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index dd2034095..ac81a0832 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -425,16 +425,8 @@ fhandler_base::fstat_fs (struct __stat64 *buf) res = fstat_by_name (buf); return res; } - query_open (query_stat_control); - if (!(oret = open_fs (open_flags, 0)) && get_errno () == EACCES) - { - /* If we couldn't open the file, try a query open with no permissions. - This allows us to determine *some* things about the file, at least. */ - pc.set_exec (0); - query_open (query_read_attributes); - oret = open_fs (open_flags, 0); - } - + query_open (query_read_attributes); + oret = open_fs (open_flags, 0); if (oret) { /* We now have a valid handle, regardless of the "nohandle" state. |