OSDN Git Service

* path.cc (normalize_win32_path): Skip all slashes after recognizing
authorcorinna <corinna>
Sat, 18 Jun 2011 08:36:56 +0000 (08:36 +0000)
committercorinna <corinna>
Sat, 18 Jun 2011 08:36:56 +0000 (08:36 +0000)
a ".." path component.  Add comment.

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

index 9ee89e9..559f99e 100644 (file)
@@ -1,3 +1,8 @@
+2011-06-18  Corinna Vinschen  <corinna@vinschen.de>
+
+       * path.cc (normalize_win32_path): Skip all slashes after recognizing
+       a ".." path component.  Add comment.
+
 2011-06-17  Corinna Vinschen  <corinna@vinschen.de>
 
        * fhandler.cc (fhandler_base::open): Drop local create_options variable.
index 7b4f124..d3e5bb6 100644 (file)
@@ -1258,7 +1258,8 @@ normalize_win32_path (const char *src, char *dst, char *&tail)
              while (tail > dst + 1 && tail[-1] != '\\' && tail[-2] != ':')
                tail--;
              src += 2;
-             if (isdirsep (*src))
+             /* Skip /'s to the next path component. */
+             while (isdirsep (*src))
                src++;
            }
        }