OSDN Git Service

* path.cc (path_conv::check): Drop setting sym.pflags before calling
authorcorinna <corinna>
Thu, 6 May 2010 10:04:50 +0000 (10:04 +0000)
committercorinna <corinna>
Thu, 6 May 2010 10:04:50 +0000 (10:04 +0000)
mount_info::conv_to_win32_path since the flag value is overwritten by
mount_info::conv_to_win32_path anyway.
Set flags for DOS paths before calling symlink_info::check so they can
be used in that function already.

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

index e5fbc9e..abaf716 100644 (file)
@@ -1,3 +1,11 @@
+2010-05-06  Corinna Vinschen  <corinna@vinschen.de>
+
+       * path.cc (path_conv::check): Drop setting sym.pflags before calling
+       mount_info::conv_to_win32_path since the flag value is overwritten by
+       mount_info::conv_to_win32_path anyway.
+       Set flags for DOS paths before calling symlink_info::check so they can
+       be used in that function already.
+
 2010-05-03  Christopher Faylor  <me+cygwin@cgf.cx>
 
        * dll_init.cc (dll_list::alloc): Add debugging assertion.
index 7782e40..7270448 100644 (file)
@@ -705,13 +705,11 @@ path_conv::check (const char *src, unsigned opt,
          if (component)
            {
              suff = NULL;
-             sym.pflags = 0;
              full_path = pathbuf;
            }
          else
            {
              suff = suffixes;
-             sym.pflags = path_flags;
              full_path = THIS_path;
            }
 
@@ -818,6 +816,13 @@ path_conv::check (const char *src, unsigned opt,
              full_path[3] = '\0';
            }
 
+         /* If the incoming path was given in DOS notation, always treat
+            it as caseinsensitive,noacl path.  This must be set before
+            calling sym.check, otherwise the path is potentially treated
+            casesensitive. */
+         if (is_msdos)
+           sym.pflags |= PATH_NOPOSIX | PATH_NOACL;
+
          symlen = sym.check (full_path, suff, opt, fs);
 
 is_virtual_symlink:
@@ -856,10 +861,6 @@ is_virtual_symlink:
                 don't handle path casesensitive. */
              if (cygwin_shared->obcaseinsensitive || fs.caseinsensitive ())
                path_flags |= PATH_NOPOSIX;
-             /* If the incoming path was given in DOS notation, always treat
-                it as caseinsensitive,noacl path. */
-             else if (is_msdos)
-               path_flags |= PATH_NOPOSIX | PATH_NOACL;
              caseinsensitive = (path_flags & PATH_NOPOSIX)
                                ? OBJ_CASE_INSENSITIVE : 0;
            }