summaryrefslogtreecommitdiff
path: root/shared-module/os
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2018-07-23 21:34:25 -0400
committerDan Halbert <halbert@halwitz.org>2018-07-23 21:34:25 -0400
commitbc760dd34100099c352a0f185ec54ceae23d036d (patch)
treecdbf3137eab7adec885ddb812daeda9b7069d679 /shared-module/os
parent2809b4f9dd08dd1e83e87f1f4088ba22f3f66cd2 (diff)
WIP: complete manual inspection of all significant changes
Diffstat (limited to 'shared-module/os')
-rw-r--r--shared-module/os/__init__.c5
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;
}