* 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.
This commit is contained in:
Corinna Vinschen 2008-08-20 10:53:54 +00:00
parent 236c21ee9e
commit 7d0a7940e6
2 changed files with 8 additions and 5 deletions

View File

@ -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> 2008-08-19 Christopher Faylor <me+cygwin@cgf.cx>
* fhandler.cc (fhandler_base::wait_overlapped): Always assume that * fhandler.cc (fhandler_base::wait_overlapped): Always assume that

View File

@ -1852,10 +1852,7 @@ symlink_info::check_shortcut (HANDLE in_h)
FILE_OPEN_FOR_BACKUP_INTENT FILE_OPEN_FOR_BACKUP_INTENT
| FILE_SYNCHRONOUS_IO_NONALERT); | FILE_SYNCHRONOUS_IO_NONALERT);
if (!NT_SUCCESS (status)) if (!NT_SUCCESS (status))
{ return 0;
set_error (EIO);
return 0;
}
status = NtQueryInformationFile (h, &io, &fsi, sizeof fsi, status = NtQueryInformationFile (h, &io, &fsi, sizeof fsi,
FileStandardInformation); FileStandardInformation);
if (!NT_SUCCESS (status)) if (!NT_SUCCESS (status))
@ -1936,7 +1933,7 @@ symlink_info::check_sysfile (HANDLE in_h)
FILE_OPEN_FOR_BACKUP_INTENT FILE_OPEN_FOR_BACKUP_INTENT
| FILE_SYNCHRONOUS_IO_NONALERT); | FILE_SYNCHRONOUS_IO_NONALERT);
if (!NT_SUCCESS (status)) if (!NT_SUCCESS (status))
set_error (EIO); ;
else if (!NT_SUCCESS (status = NtReadFile (h, NULL, NULL, NULL, &io, else if (!NT_SUCCESS (status = NtReadFile (h, NULL, NULL, NULL, &io,
cookie_buf, sizeof (cookie_buf), cookie_buf, sizeof (cookie_buf),
NULL, NULL))) NULL, NULL)))