diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lfs.c | 3 |
1 files changed, 0 insertions, 3 deletions
@@ -367,10 +367,8 @@ static int make_dir (lua_State *L) { | |||
367 | const char *path = luaL_checkstring (L, 1); | 367 | const char *path = luaL_checkstring (L, 1); |
368 | int fail; | 368 | int fail; |
369 | #ifdef _WIN32 | 369 | #ifdef _WIN32 |
370 | int oldmask = umask (0); | ||
371 | fail = _mkdir (path); | 370 | fail = _mkdir (path); |
372 | #else | 371 | #else |
373 | mode_t oldmask = umask( (mode_t)0 ); | ||
374 | fail = mkdir (path, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | | 372 | fail = mkdir (path, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | |
375 | S_IWGRP | S_IXGRP | S_IROTH | S_IXOTH ); | 373 | S_IWGRP | S_IXGRP | S_IROTH | S_IXOTH ); |
376 | #endif | 374 | #endif |
@@ -379,7 +377,6 @@ static int make_dir (lua_State *L) { | |||
379 | lua_pushfstring (L, "%s", strerror(errno)); | 377 | lua_pushfstring (L, "%s", strerror(errno)); |
380 | return 2; | 378 | return 2; |
381 | } | 379 | } |
382 | umask (oldmask); | ||
383 | lua_pushboolean (L, 1); | 380 | lua_pushboolean (L, 1); |
384 | return 1; | 381 | return 1; |
385 | } | 382 | } |