From ceef077aea62b57e8d97bbdc4f16a045236907e3 Mon Sep 17 00:00:00 2001 From: Nguyễn Thái Ngọc Duy Date: Wed, 14 Apr 2010 00:34:54 +0200 Subject: win32: ash: is_absolute_path() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nguyễn Thái Ngọc Duy --- shell/ash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'shell') diff --git a/shell/ash.c b/shell/ash.c index bfbd6a027..05ca74579 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -2527,7 +2527,7 @@ cdcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) } if (!dest) dest = nullstr; - if (*dest == '/') + if (is_absolute_path(dest)) goto step7; if (*dest == '.') { c = dest[1]; @@ -12213,7 +12213,7 @@ find_command(char *name, struct cmdentry *entry, int act, const char *path) } } /* if rehash, don't redo absolute path names */ - if (fullname[0] == '/' && idx <= prev) { + if (is_absolute_path(fullname) && idx <= prev) { if (idx < prev) continue; TRACE(("searchexec \"%s\": no change\n", name)); -- cgit v1.2.3-55-g6feb