OSDN Git Service

* path.cc (normalize_posix_path): Convert win32 path separators to slashes when
authorcgf <cgf>
Thu, 16 Jan 2003 01:49:14 +0000 (01:49 +0000)
committercgf <cgf>
Thu, 16 Jan 2003 01:49:14 +0000 (01:49 +0000)
full path is specified.

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

index a561333..956a7fb 100644 (file)
@@ -1,3 +1,8 @@
+2003-01-15  Christopher Faylor  <cgf@redhat.com>
+
+       * path.cc (normalize_posix_path): Convert win32 path separators to
+       slashes when full path is specified.
+
 2003-01-15  Pierre Humblet  <pierre.humblet@ieee.org>
 
        * cmalloc.cc (_cmalloc): Fix memory leak.
index fddcbea..aeeea9d 100644 (file)
@@ -205,7 +205,13 @@ normalize_posix_path (const char *src, char *dst)
   syscall_printf ("src %s", src);
 
   if (isdrive (src) || strpbrk (src, "\\:"))
-    return normalize_win32_path (src, dst);
+    {
+      int err = normalize_win32_path (src, dst);
+      if (!err && isdrive (dst))
+       for (char *p = dst; (p = strchr (p, '\\')); p++)
+         *p = '/';
+      return err;
+    }
 
   if (!isslash (src[0]))
     {