diff options
| author | Dan Halbert <halbert@halwitz.org> | 2018-06-15 10:51:03 -0400 |
|---|---|---|
| committer | Dan Halbert <halbert@halwitz.org> | 2018-06-15 10:51:03 -0400 |
| commit | 327b0f76dac55a4bfe5df52799f72734623a351a (patch) | |
| tree | a0ee73aa685c9ab72dcce4a0a54eee7c13313ee3 /shared-module/os | |
| parent | 720042f96454ae347b2fe85baa36cde0cf5ce17e (diff) | |
fix os.listdir() when current dir is '/'
Diffstat (limited to 'shared-module/os')
| -rw-r--r-- | shared-module/os/__init__.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shared-module/os/__init__.c b/shared-module/os/__init__.c index 9eb04e281..1dadd254a 100644 --- a/shared-module/os/__init__.c +++ b/shared-module/os/__init__.c @@ -103,7 +103,7 @@ mp_obj_t common_hal_os_listdir(const char* path) { iter.base.type = &mp_type_polymorph_iter; iter.iternext = mp_vfs_ilistdir_it_iternext; iter.cur.vfs = MP_STATE_VM(vfs_mount_table); - iter.is_str = mp_obj_get_type(path) == &mp_type_str; + iter.is_str = true; iter.is_iter = false; } else { iter_obj = mp_vfs_proxy_call(vfs, MP_QSTR_ilistdir, 1, &path_out); |
