diff --git a/apps/shell/builtin/cd.c b/apps/shell/builtin/cd.c index 6fdd41d36c99730306c6b965bd4b2f8d8c04203e..e2bc58f418f371cf91ad4a7103cad637faa153cb 100755 --- 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;