This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

bug in path.cc


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]