From cfec7a63a5f9dad12980aea21b60c990c7b7285a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B7=E9=92=A6=E8=A1=97?= <15390014138@163.com> Date: Thu, 4 Feb 2021 20:27:22 +0800 Subject: [PATCH] update apps/shell/builtin/cd.c. --- apps/shell/builtin/cd.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/apps/shell/builtin/cd.c b/apps/shell/builtin/cd.c index 56d6897e..d6160212 100644 --- a/apps/shell/builtin/cd.c +++ b/apps/shell/builtin/cd.c @@ -53,10 +53,7 @@ int Chdir(const char *tgtDir) ret = chdir(tgtDir); if (ret == 0) { - ret = OsShellSetWorkingDirtectory(tgtDir, strlen(tgtDir) + 1); /* 1: the length of '\0' */ - if (ret != SH_NOK) { - return ret; - } + ret = OsShellSetWorkingDirtectory(tgtDir, strlen(tgtDir) + 1); /* 1: the length of '\0' */ } return ret; -- GitLab