fs/romfs: Support the path with tail '/' correctly

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I7ea668e50e68cb384d013349a2c8cfc2844f3b73
This commit is contained in:
Xiang Xiao 2020-07-31 02:51:05 +08:00 committed by Abdelatif Guettouche
parent 2d7f58d165
commit 1bad139f88

View File

@ -751,6 +751,11 @@ int romfs_finddirentry(struct romfs_mountpt_s *rm,
entrylen = terminator - entryname;
}
if (entrylen == 0)
{
return OK;
}
/* Long path segment names will be truncated to NAME_MAX */
if (entrylen > NAME_MAX)