* shortcut.c (check_shortcut): Close input file handle before returning.

* path.cc (check_sysfile): Ditto.
(symlink_info::check): Rely on opened file handle being closed by symlink
checking routines.  Set ext_tacked_on when .lnk is detected.
This commit is contained in:
Christopher Faylor
2001-04-22 16:19:27 +00:00
parent da77d416c5
commit 96dc5dd7e5
3 changed files with 31 additions and 22 deletions

View File

@ -98,7 +98,7 @@ check_shortcut (const char *path, DWORD fileattr, HANDLE h,
goto close_it;
/* Read the files header information. This is used to check for a
Cygwin or U/WIN shortcut or later to check for executable files. */
if (! ReadFile (h, file_header, SHORTCUT_HDR_SIZE, &got, 0))
if (!ReadFile (h, file_header, SHORTCUT_HDR_SIZE, &got, 0))
{
*error = EIO;
goto close_it;
@ -160,8 +160,7 @@ close_it:
psl->lpVtbl->Release(psl);
/* Uninitialize COM library. */
CoUninitialize ();
CloseHandle (h);
return res;
}