From 9ebf22b34b5e8d4b8bd147a038458d82735d9d2e Mon Sep 17 00:00:00 2001
From: Peter Stephenson
Date: Mon, 5 Aug 2013 19:55:15 +0100
Subject: 31631: Use cygwin_conv_path if available. Prefer it to
cygwin_conv_to_posix_path.
---
Src/builtin.c | 5 +++++
1 file changed, 5 insertions(+)
(limited to 'Src/builtin.c')
diff --git a/Src/builtin.c b/Src/builtin.c
index ae2e9f676..3159975e3 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -939,11 +939,16 @@ cd_do_chdir(char *cnam, char *dest, int hard)
* DOS style names with drives in them
*/
static char buf[PATH_MAX];
+#ifdef HAVE_CYGWIN_CONV_PATH
+ cygwin_conv_path(CCP_WIN_A_TO_POSIX | CCP_RELATIVE, dest, buf,
+ PATH_MAX);
+#else
#ifndef _SYS_CYGWIN_H
void cygwin_conv_to_posix_path(const char *, char *);
#endif
cygwin_conv_to_posix_path(dest, buf);
+#endif
dest = buf;
#endif
nocdpath = dest[0] == '.' &&
--
cgit 1.4.1