]> sourceware.org Git - newlib-cygwin.git/commitdiff
* path.cc (normalize_posix_path): Test runs of more than two
authorCorinna Vinschen <corinna@vinschen.de>
Sat, 25 Oct 2003 16:12:45 +0000 (16:12 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Sat, 25 Oct 2003 16:12:45 +0000 (16:12 +0000)
dots for being a run of only dots.  Let it pass if not.

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

index 7424580aab6320b7db4e430dbf5b7da543e09632..3392bfe09ade78d2e6208dbefdb3243f3165cb59 100644 (file)
@@ -1,3 +1,8 @@
+2003-10-25  Corinna Vinschen  <corinna@vinschen.de>
+
+       * path.cc (normalize_posix_path): Test runs of more than two
+       dots for being a run of only dots.  Let it pass if not.
+
 2003-10-25  Brian Ford  <ford@vss.fsi.com>
 
        * fhandler.cc (fhandler_base::ioctl): Handle FIONBIO.
index 318986a7ee08fde304b0a7ead7240a6ccffb434f..b759d611c15088462d926cc9ac6f3c515236d924 100644 (file)
@@ -282,7 +282,14 @@ normalize_posix_path (const char *src, char *dst)
              else if (src[2] && !isslash (src[2]))
                {
                  if (src[2] == '.')
-                   return ENOENT;
+                   {
+                     /* Is this a run of dots? That would be an invalid
+                        filename.  A bunch of leading dots would be ok,
+                        though. */
+                     int n = strspn (src, ".");
+                     if (!src[n] || isslash (src[n])) /* just dots... */
+                       return ENOENT;
+                   }
                  break;
                }
              else
This page took 0.035395 seconds and 5 git commands to generate.