diff options
author | Damien George <damien.p.george@gmail.com> | 2017-05-13 18:58:46 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-05-13 18:58:46 +1000 |
commit | f95e4e77823919dfe82b6711f1d25d2d8c5008fc (patch) | |
tree | 43096641aa9b58c9ca0171a8f4a22cffbdd53876 | |
parent | 71df60cf42d831b4d6e39dc7bee3c45f46befdab (diff) | |
download | micropython-f95e4e77823919dfe82b6711f1d25d2d8c5008fc.tar.gz micropython-f95e4e77823919dfe82b6711f1d25d2d8c5008fc.zip |
extmod/vfs_fat_misc: Remove dot-dirs filter since FatFS already does it.
-rw-r--r-- | extmod/vfs_fat_misc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/extmod/vfs_fat_misc.c b/extmod/vfs_fat_misc.c index 5b906189f2..7c16db7e5b 100644 --- a/extmod/vfs_fat_misc.c +++ b/extmod/vfs_fat_misc.c @@ -52,10 +52,8 @@ STATIC mp_obj_t mp_vfs_fat_ilistdir_it_iternext(mp_obj_t self_in) { // stop on error or end of dir break; } - if (fn[0] == '.' && (fn[1] == 0 || (fn[1] == '.' && fn[2] == 0))) { - // skip . and .. - continue; - } + + // Note that FatFS already filters . and .., so we don't need to // make 3-tuple with info about this entry mp_obj_tuple_t *t = MP_OBJ_TO_PTR(mp_obj_new_tuple(3, NULL)); |