Enable •file.CreateDir on Windows
This commit is contained in:
parent
0601a86f56
commit
ce255c4a53
@ -7,6 +7,7 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(_WIN64)
|
#if defined(_WIN32) || defined(_WIN64)
|
||||||
|
#include <direct.h>
|
||||||
#include "../windows/realpath.c"
|
#include "../windows/realpath.c"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -338,7 +339,7 @@ void mmap_init() { }
|
|||||||
bool dir_create(B path) {
|
bool dir_create(B path) {
|
||||||
char* p = toCStr(path);
|
char* p = toCStr(path);
|
||||||
#if defined(_WIN32) || defined(_WIN64)
|
#if defined(_WIN32) || defined(_WIN64)
|
||||||
bool r = 0;
|
bool r = _mkdir(p) == 0;
|
||||||
#else
|
#else
|
||||||
bool r = mkdir(p, S_IRWXU) == 0;
|
bool r = mkdir(p, S_IRWXU) == 0;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user