summaryrefslogtreecommitdiff
path: root/shared-bindings
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2018-06-15 10:51:03 -0400
committerDan Halbert <halbert@halwitz.org>2018-06-15 10:51:03 -0400
commit327b0f76dac55a4bfe5df52799f72734623a351a (patch)
treea0ee73aa685c9ab72dcce4a0a54eee7c13313ee3 /shared-bindings
parent720042f96454ae347b2fe85baa36cde0cf5ce17e (diff)
fix os.listdir() when current dir is '/'
Diffstat (limited to 'shared-bindings')
-rw-r--r--shared-bindings/os/__init__.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shared-bindings/os/__init__.c b/shared-bindings/os/__init__.c
index 159f5448a..1b8831afa 100644
--- a/shared-bindings/os/__init__.c
+++ b/shared-bindings/os/__init__.c
@@ -87,7 +87,7 @@ mp_obj_t os_listdir(size_t n_args, const mp_obj_t *args) {
if (n_args == 1) {
path = mp_obj_str_get_str(args[0]);
} else {
- path = "";
+ path = mp_obj_str_get_str(common_hal_os_getcwd());
}
return common_hal_os_listdir(path);
}