diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2008-08-20 14:53:54 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2008-08-20 14:53:54 +0400 |
commit | 7d0a7940e65bebf69e5e0b2971f50bbc3afa409e (patch) | |
tree | 10b5b79c2d637270b7e81796503b9fe17f48ce25 /winsup/cygwin | |
parent | 236c21ee9e040bbdef9243bb6ac72f91a2e09c55 (diff) |
* path.cc (symlink_info::check_shortcut): If file can't be opened,
treat it as non-symlink rather than generating an EIO error.
(symlink_info::check_sysfile): Ditto.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r-- | winsup/cygwin/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/cygwin/path.cc | 7 |
2 files changed, 8 insertions, 5 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 056af7255..3d813be89 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2008-08-20 Corinna Vinschen <corinna@vinschen.de> + + * path.cc (symlink_info::check_shortcut): If file can't be opened, + treat it as non-symlink rather than generating an EIO error. + (symlink_info::check_sysfile): Ditto. + 2008-08-19 Christopher Faylor <me+cygwin@cgf.cx> * fhandler.cc (fhandler_base::wait_overlapped): Always assume that diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 454efadeb..8441ed4d0 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -1852,10 +1852,7 @@ symlink_info::check_shortcut (HANDLE in_h) FILE_OPEN_FOR_BACKUP_INTENT | FILE_SYNCHRONOUS_IO_NONALERT); if (!NT_SUCCESS (status)) - { - set_error (EIO); - return 0; - } + return 0; status = NtQueryInformationFile (h, &io, &fsi, sizeof fsi, FileStandardInformation); if (!NT_SUCCESS (status)) @@ -1936,7 +1933,7 @@ symlink_info::check_sysfile (HANDLE in_h) FILE_OPEN_FOR_BACKUP_INTENT | FILE_SYNCHRONOUS_IO_NONALERT); if (!NT_SUCCESS (status)) - set_error (EIO); + ; else if (!NT_SUCCESS (status = NtReadFile (h, NULL, NULL, NULL, &io, cookie_buf, sizeof (cookie_buf), NULL, NULL))) |