diff --git a/apps/shell/builtin/cd.c b/apps/shell/builtin/cd.c index 56d6897e3df557dec7456374a0db53acd864b046..d616021260302789053fc0d643f79b40e44709ea 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;