提交 6680a6b5 编写于 作者: B Bernard Xiong

Merge pull request #569 from www220/fix-15-10-12-1

[DFS] 修正romfs在输入的目录名称比实际的名称短时存在的判断错误
......@@ -96,7 +96,8 @@ struct romfs_dirent *dfs_romfs_lookup(struct romfs_dirent *root_dirent, const ch
{
if (check_dirent(&dirent[index]) != 0)
return RT_NULL;
if (rt_strncmp(dirent[index].name, subpath, (subpath_end - subpath)) == 0)
if (rt_strlen(dirent[index].name) == (subpath_end - subpath) &&
rt_strncmp(dirent[index].name, subpath, (subpath_end - subpath)) == 0)
{
dirent_size = dirent[index].size;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册