Skip to content

Commit 908f515

Browse files
committed
unix/modos: Add Windows workaround for mkdir().
1 parent 5be60d6 commit 908f515

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

unix/modos.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,11 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_os_getenv_obj, mod_os_getenv);
144144
STATIC mp_obj_t mod_os_mkdir(mp_obj_t path_in) {
145145
// TODO: Accept mode param
146146
const char *path = mp_obj_str_get_str(path_in);
147+
#ifdef _WIN32
148+
int r = mkdir(path);
149+
#else
147150
int r = mkdir(path, 0777);
151+
#endif
148152
RAISE_ERRNO(r, errno);
149153
return mp_const_none;
150154
}

0 commit comments

Comments
 (0)