fatfs Fix nested path formatting in fatfs_read_dir_entry ()
All checks were successful
Build ISO image / build-and-deploy (push) Successful in 37s
Build documentation / build-and-deploy (push) Successful in 1m8s

This commit is contained in:
2026-04-06 10:44:49 +02:00
parent fe628466b4
commit 385b1f0db0

View File

@@ -261,6 +261,10 @@ DEFINE_VFS_READ_DIR_ENTRY (fatfs_read_dir_entry) {
while (fl_readdir (fatfs_ctx, &dir, &dirent) == 0) {
if (dirent_num == entry_num) {
strncat (entry->path, path, PATH_MAX);
if (strcmp (path, "/") != 0)
strncat (entry->path, "/", PATH_MAX);
strncat (entry->path, dirent.filename, PATH_MAX);
break;
}