summaryrefslogtreecommitdiff
path: root/fs/fat/fat.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/fat/fat.c')
-rw-r--r--fs/fat/fat.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/fat/fat.c b/fs/fat/fat.c
index 6a6c5be0168..972ef33d03c 100644
--- a/fs/fat/fat.c
+++ b/fs/fat/fat.c
@@ -860,9 +860,11 @@ do_fat_read (const char *filename, void *buffer, unsigned long maxsize,
int doit = 0;
if (isdir) {
- dirs++;
dirc = '/';
- doit = 1;
+ if (s_name[0] != 0) {
+ dirs++;
+ doit = 1;
+ }
} else {
dirc = ' ';
if (s_name[0] != 0) {