Subject: bug in path.cc
From: Joe Buehler <[email-masked]>
To: [email-masked]
Date: Wed, 10 Jul 2002 13:19:03 -0400
Newsgroups: gmane.os.cygwin

This code in winsup/cygwin/path.cc looks a little suspicious:

   /* Check for shortcut as symlink condition. */
   if (win32_name.has_attribute (FILE_ATTRIBUTE_READONLY))
     {
       int len = strlen (win32_name);
       if (len > 4 && strcasematch ((char *) win32_name + len - 4, ".lnk"))
         SetFileAttributes (win32_name, (DWORD) win32_name & ~FILE_ATTRIBUTE_READONLY);
     }

The second argument to SetFileAttributes should be using a field in win32_name,
not win32_name itself, seems like.

Joe Buehler

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/