You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ag...@apache.org on 2020/09/22 22:05:21 UTC
[incubator-nuttx] 01/02: fs/fat: Handle the tail '/' correctly
This is an automated email from the ASF dual-hosted git repository.
aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 856763737813c864aab5738eb2482dc4331c0b0f
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Tue Sep 22 14:44:41 2020 +0800
fs/fat: Handle the tail '/' correctly
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
Change-Id: I72c4d018c174d094d777941d0679ad792a1f5527
---
fs/fat/fs_fat32dirent.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/fs/fat/fs_fat32dirent.c b/fs/fat/fs_fat32dirent.c
index bf85f80..8ba2aae 100644
--- a/fs/fat/fs_fat32dirent.c
+++ b/fs/fat/fs_fat32dirent.c
@@ -2656,6 +2656,11 @@ int fat_finddirentry(FAR struct fat_mountpt_s *fs,
return -ENOTDIR;
}
+ if (*path == '\0')
+ {
+ return OK;
+ }
+
/* Get the cluster number of this directory */
cluster =