summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/fat/fat.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/fat/fat.c b/fs/fat/fat.c
index f7bb1da..19f6a8c 100644
--- a/fs/fat/fat.c
+++ b/fs/fat/fat.c
@@ -1109,11 +1109,11 @@ rootdir_done:
goto exit;
}
- if (idx >= 0) {
- if (!(dentptr->attr & ATTR_DIR))
- goto exit;
+ if (isdir && !(dentptr->attr & ATTR_DIR))
+ goto exit;
+
+ if (idx >= 0)
subname = nextname;
- }
}
ret = get_contents(mydata, dentptr, buffer, maxsize);