OSDN Git Service

* path.cc (symlink_info::check): Add a check to return correctly
authorcorinna <corinna>
Fri, 25 May 2001 08:31:56 +0000 (08:31 +0000)
committercorinna <corinna>
Fri, 25 May 2001 08:31:56 +0000 (08:31 +0000)
        if incoming `*.lnk' file is not a symlink.

winsup/cygwin/ChangeLog
winsup/cygwin/path.cc

index 29e8314..9aab7d2 100644 (file)
@@ -1,3 +1,8 @@
+Fri May 25 10:15:00 2001  Corinna Vinschen <corinna@vinschen.de>
+
+       * 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 <cgf@cygnus.com>
 
        * path.cc (slash_drive_prefix_p): Remove.
index f2d3bd3..b9ca7ef 100644 (file)
@@ -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;