summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--components/finsh/msh_cmd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/components/finsh/msh_cmd.c b/components/finsh/msh_cmd.c
index 67708d33e6..b5881d897a 100644
--- a/components/finsh/msh_cmd.c
+++ b/components/finsh/msh_cmd.c
@@ -189,7 +189,10 @@ int cmd_cd(int argc, char **argv)
}
else if (argc == 2)
{
- chdir(argv[1]);
+ if (chdir(argv[1]) != 0)
+ {
+ rt_kprintf("No such directory: %s\n", argv[1]);
+ }
}
return 0;