We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 65dd7bc commit f8f963aCopy full SHA for f8f963a
1 file changed
stmhal/modos.c
@@ -92,9 +92,11 @@ STATIC mp_obj_t os_listdir(uint n_args, const mp_obj_t *args) {
92
if (path[0] == '/' && path[1] == '\0') {
93
mp_obj_t dir_list = mp_obj_new_list(0, NULL);
94
mp_obj_list_append(dir_list, MP_OBJ_NEW_QSTR(MP_QSTR_flash));
95
+#if MICROPY_HW_HAS_SDCARD
96
if (sdcard_is_present()) { // TODO this is not the correct logic to check for /sd
97
mp_obj_list_append(dir_list, MP_OBJ_NEW_QSTR(MP_QSTR_sd));
98
}
99
+#endif
100
return dir_list;
101
102
0 commit comments