未验证 提交 b0c046f8 编写于 作者: O openharmony_ci 提交者: Gitee

!776 修复toybox mv指令能够移动成功,但提示错误22的BUG

Merge pull request !776 from Far/master
...@@ -119,7 +119,10 @@ static int GetFullpathNull(int fd, const char *path, char **filePath) ...@@ -119,7 +119,10 @@ static int GetFullpathNull(int fd, const char *path, char **filePath)
if (ret < 0) { if (ret < 0) {
return -get_errno(); return -get_errno();
} }
fullPath = file->f_path; fullPath = strdup(file->f_path);
if (fullPath == NULL) {
ret = -ENOMEM;
}
} else { } else {
ret = GetFullpath(fd, path, &fullPath); ret = GetFullpath(fd, path, &fullPath);
if (ret < 0) { if (ret < 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册