From fdc5ebe9bf51c34fe16cf678424c6c11f4e020cf Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 25 May 2001 08:31:57 +0000 Subject: [PATCH] * path.cc (symlink_info::check): Add a check to return correctly if incoming `*.lnk' file is not a symlink. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/path.cc | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 29e8314db..9aab7d28c 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +Fri May 25 10:15:00 2001 Corinna Vinschen + + * path.cc (symlink_info::check): Add a check to return correctly + if incoming `*.lnk' file is not a symlink. + Thu May 24 15:46:50 2001 Christopher Faylor * path.cc (slash_drive_prefix_p): Remove. diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index f2d3bd3c5..b9ca7ef62 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -2690,7 +2690,7 @@ symlink_info::check (char *path, const suffix_info *suffixes, unsigned opt) } /* If searching for `foo' and then finding a `foo.lnk' which is no shortcut, return the same as if file not found. */ - if (!suffix.lnk_match ()) + if (!suffix.lnk_match () || pathmatch(path, suffix.path)) goto file_not_symlink; fileattr = (DWORD) -1;