diff options
Diffstat (limited to 'src/kernel/fat.c')
-rw-r--r-- | src/kernel/fat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kernel/fat.c b/src/kernel/fat.c index befc1d8..5ba62cf 100644 --- a/src/kernel/fat.c +++ b/src/kernel/fat.c @@ -328,7 +328,7 @@ static uint32_t fat_enumerate_dir(const struct drive *d, const char *path, struc if (!*path) return enumerate_root(d, info, max); - if (!try_load_from_path(d, path)) { + if (!try_load_from_path(d, path) || !(cur_dir->attrib & FA_DIRECTORY)) { d->done(d); return 0; } @@ -397,7 +397,7 @@ static uint32_t fat_n_dir_entries(const struct drive *d, const char *path) { if (!*path) return n_root_entries(d); - if (!try_load_from_path(d, path)) { + if (!try_load_from_path(d, path) || !(cur_dir->attrib & FA_DIRECTORY)) { d->done(d); return 0; } |