Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
908f5159
Commit
908f5159
authored
Nov 14, 2015
by
Paul Sokolovsky
Browse files
unix/modos: Add Windows workaround for mkdir().
parent
5be60d69
Changes
1
Hide whitespace changes
Inline
Side-by-side
unix/modos.c
View file @
908f5159
...
@@ -144,7 +144,11 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_os_getenv_obj, mod_os_getenv);
...
@@ -144,7 +144,11 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_os_getenv_obj, mod_os_getenv);
STATIC
mp_obj_t
mod_os_mkdir
(
mp_obj_t
path_in
)
{
STATIC
mp_obj_t
mod_os_mkdir
(
mp_obj_t
path_in
)
{
// TODO: Accept mode param
// TODO: Accept mode param
const
char
*
path
=
mp_obj_str_get_str
(
path_in
);
const
char
*
path
=
mp_obj_str_get_str
(
path_in
);
#ifdef _WIN32
int
r
=
mkdir
(
path
);
#else
int
r
=
mkdir
(
path
,
0777
);
int
r
=
mkdir
(
path
,
0777
);
#endif
RAISE_ERRNO
(
r
,
errno
);
RAISE_ERRNO
(
r
,
errno
);
return
mp_const_none
;
return
mp_const_none
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment