diff options
| author | Dan Halbert <halbert@halwitz.org> | 2018-07-23 21:34:25 -0400 |
|---|---|---|
| committer | Dan Halbert <halbert@halwitz.org> | 2018-07-23 21:34:25 -0400 |
| commit | bc760dd34100099c352a0f185ec54ceae23d036d (patch) | |
| tree | cdbf3137eab7adec885ddb812daeda9b7069d679 /shared-module/os | |
| parent | 2809b4f9dd08dd1e83e87f1f4088ba22f3f66cd2 (diff) | |
WIP: complete manual inspection of all significant changes
Diffstat (limited to 'shared-module/os')
| -rw-r--r-- | shared-module/os/__init__.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/shared-module/os/__init__.c b/shared-module/os/__init__.c index 67d489f37..a38f3781f 100644 --- a/shared-module/os/__init__.c +++ b/shared-module/os/__init__.c @@ -112,9 +112,8 @@ mp_obj_t common_hal_os_listdir(const char* path) { mp_obj_t dir_list = mp_obj_new_list(0, NULL); mp_obj_t next; while ((next = mp_iternext(iter_obj)) != MP_OBJ_STOP_ITERATION) { - mp_obj_t *items; - mp_obj_get_array_fixed_n(next, 3, &items); - mp_obj_list_append(dir_list, items[0]); + // next[0] is the filename. + mp_obj_list_append(dir_list, mp_obj_subscr(next, MP_OBJ_NEW_SMALL_INT(0), MP_OBJ_SENTINEL)); } return dir_list; } |
