This is an automated email from the ASF dual-hosted git repository.
linguini pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 1f157561568 fs/fat: Ignore //... sequences in the file path
1f157561568 is described below
commit 1f157561568e326895545ae621b6584dc2e691e4
Author: Alan C. Assis <[email protected]>
AuthorDate: Tue Oct 21 10:06:38 2025 -0300
fs/fat: Ignore //... sequences in the file path
This fixes an issue reported by user harishn6 on github.
Signed-off-by: Alan C. Assis <[email protected]>
---
fs/fat/fs_fat32dirent.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/fs/fat/fs_fat32dirent.c b/fs/fat/fs_fat32dirent.c
index b5baa6dca92..ed58c9fa21e 100644
--- a/fs/fat/fs_fat32dirent.c
+++ b/fs/fat/fs_fat32dirent.c
@@ -362,6 +362,13 @@ static inline int fat_parsesfname(FAR const char **path,
#ifdef CONFIG_FAT_LCNAMES
dirinfo->fd_ntflags = ntlcfound & ntlcenable;
#endif
+ /* Ignore sequences of //... in the filename */
+
+ while (node && *node == '/')
+ {
+ node++;
+ }
+
*terminator = ch;
*path = node;
return OK;