mirror of
https://github.com/apache/nuttx.git
synced 2026-05-19 03:03:37 +08:00
fs/fat: Ignore multiple consecutive slashes in long file names
This fixes the same issue as in 1f15756156, for long file names.
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
This commit is contained in:
committed by
Xiang Xiao
parent
0c6fe04ef7
commit
58978490ad
@@ -607,6 +607,13 @@ static inline int fat_parselfname(FAR const char **path,
|
||||
|
||||
dirinfo->fd_lfname[ndx] = '\0';
|
||||
|
||||
/* Ignore sequences of //... in the filename */
|
||||
|
||||
while (node && *node == '/')
|
||||
{
|
||||
node++;
|
||||
}
|
||||
|
||||
/* Return the remaining sub-string and the terminating character. */
|
||||
|
||||
*terminator = (char)ch;
|
||||
|
||||
Reference in New Issue
Block a user