mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 22:51:37 +00:00
FAT: Fix file contents listed as directory
With: fatls mmc 0 /dir/file dir: regular directory file: regular file The previous code read the contents of file as if it were directory entries to list. This patch refuses to list file contents as if it were a folder. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Cc: Wolfgang Denk <wd@denx.de>
This commit is contained in:
parent
d5370febbc
commit
7ee46cebcb
1 changed files with 4 additions and 4 deletions
|
@ -1109,11 +1109,11 @@ rootdir_done:
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (idx >= 0) {
|
if (isdir && !(dentptr->attr & ATTR_DIR))
|
||||||
if (!(dentptr->attr & ATTR_DIR))
|
goto exit;
|
||||||
goto exit;
|
|
||||||
|
if (idx >= 0)
|
||||||
subname = nextname;
|
subname = nextname;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = get_contents(mydata, dentptr, buffer, maxsize);
|
ret = get_contents(mydata, dentptr, buffer, maxsize);
|
||||||
|
|
Loading…
Add table
Reference in a new issue