From 7d0a7940e65bebf69e5e0b2971f50bbc3afa409e Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 20 Aug 2008 10:53:54 +0000 Subject: [PATCH] * 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. --- winsup/cygwin/ChangeLog | 6 ++++++ 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 + + * 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 * 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)))