summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-01-16 01:49:14 +0000
committerChristopher Faylor <me@cgf.cx>2003-01-16 01:49:14 +0000
commit188132541b22cfc8d8804dc6304a4338bb338472 (patch)
tree4fe32c30c39fc05760a54b087f71411cd860811b
parentce9eeb04a676649d30277968bc5153140ea4724d (diff)
downloadcygnal-188132541b22cfc8d8804dc6304a4338bb338472.tar.gz
cygnal-188132541b22cfc8d8804dc6304a4338bb338472.tar.bz2
cygnal-188132541b22cfc8d8804dc6304a4338bb338472.zip
* path.cc (normalize_posix_path): Convert win32 path separators to slashes when
full path is specified.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/path.cc8
2 files changed, 12 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index a561333e0..956a7fb1a 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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.
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index fddcbea3b..aeeea9d87 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -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]))
{