提交 74942030 编写于 作者: M mucor

fix:shell cmd rm -r crash when open target dir failed

Change-Id: I1146ab12b02aeef3f9a2a0422ee45936f5e4c105
上级 8592e04c
......@@ -837,6 +837,10 @@ static int os_shell_cmd_do_rmdir(const char *pathname)
return remove(pathname);
}
d = opendir(pathname);
if (d == NULL)
{
return -1;
}
while (1)
{
dirent = readdir(d);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册