]> sourceware.org Git - newlib-cygwin.git/commitdiff
* path.cc (normalize_posix_path): Put check for '//' prefix back to denote a
authorChristopher Faylor <me@cgf.cx>
Thu, 11 Sep 2003 17:46:31 +0000 (17:46 +0000)
committerChristopher Faylor <me@cgf.cx>
Thu, 11 Sep 2003 17:46:31 +0000 (17:46 +0000)
UNC path.
(slash_unc_prefix_p): Remove vestige of old //c method for accessing drives.

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

index 28be890db985fac02f1270df5a74537a9d6c515d..42da4a5e62abf4a440d98bb6f1da4852d7eed34a 100644 (file)
@@ -1,3 +1,10 @@
+2003-09-11  Christopher Faylor  <cgf@redhat.com>
+
+       * path.cc (normalize_posix_path): Put check for '//' prefix back to
+       denote a UNC path.
+       (slash_unc_prefix_p): Remove vestige of old //c method for accessing
+       drives.
+
 2003-09-11  Christopher Faylor  <cgf@redhat.com>
 
        * dir.cc (rmdir): Add more samba workarounds.
index 6412a8a11a7762bb4b66ccdb7aac7b60b661512f..b0108777e8117b44ceb52a05030c3bfe9c77b862 100644 (file)
@@ -203,10 +203,10 @@ normalize_posix_path (const char *src, char *dst)
 
   syscall_printf ("src %s", src);
 
-  if (isdrive (src))
+  if (isdrive (src) || slash_unc_prefix_p (src))
     {
       int err = normalize_win32_path (src, dst);
-      if (!err && isdrive (dst))
+      if (!err)
        for (char *p = dst; (p = strchr (p, '\\')); p++)
          *p = '/';
       return err;
@@ -1315,9 +1315,7 @@ slash_unc_prefix_p (const char *path)
   char *p = NULL;
   int ret = (isdirsep (path[0])
             && isdirsep (path[1])
-            && isalpha (path[2])
-            && path[3] != 0
-            && !isdirsep (path[3])
+            && isalnum (path[2])
             && ((p = strpbrk (path + 3, "\\/")) != NULL));
   if (!ret || p == NULL)
     return ret;
This page took 0.035713 seconds and 5 git commands to generate.