From 63cf261f11baeaf89bf5a83ce3c62c9415dfcc84 Mon Sep 17 00:00:00 2001 From: tg Date: Sat, 14 Oct 2017 20:11:30 +0000 Subject: [PATCH] =?UTF-8?q?fix=20=E2=80=9Ccd=20e:foo=E2=80=9D=20on=20DOSPA?= =?UTF-8?q?TH=20systems=20(I=20think)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- misc.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/misc.c b/misc.c index b34e323..ae8bb2a 100644 --- a/misc.c +++ b/misc.c @@ -32,7 +32,7 @@ #include #endif -__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.286 2017/10/12 15:17:03 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.287 2017/10/14 20:11:30 tg Exp $"); #define KSH_CHVT_FLAG #ifdef MKSH_SMALL @@ -2188,6 +2188,17 @@ c_cd(const char **wp) return (2); } +#ifdef MKSH_DOSPATH + if (mksh_drvltr(dir) && !mksh_cdirsep(dir[2]) && + !getdrvwd(&tryp, ord(*dir))) { + dir = shf_smprintf(Tf_sss, tryp, + dir[2] ? "/" : "", dir + 2); + afree(tryp, ATEMP); + afree(allocd, ATEMP); + allocd = dir; + } +#endif + #ifdef MKSH__NO_PATH_MAX /* only a first guess; make_path will enlarge xs if necessary */ XinitN(xs, 1024, ATEMP);