summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/path.cc
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 /winsup/cygwin/path.cc
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.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc8
1 files changed, 7 insertions, 1 deletions
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]))
{