diff options
| author | Fabio Mascarenhas <mascarenhas@lambda-2.local> | 2009-12-29 17:06:25 -0200 |
|---|---|---|
| committer | Fabio Mascarenhas <mascarenhas@lambda-2.local> | 2009-12-29 17:06:25 -0200 |
| commit | fd028d32578fa0b7d5dfc89345f851b02a5af196 (patch) | |
| tree | e7b8b6b6098b340b1a267c18cdf0f26907d23872 /src | |
| parent | 8ff20138af779f6f38cbff12d22df1a3151d9fa6 (diff) | |
| download | luafilesystem-fd028d32578fa0b7d5dfc89345f851b02a5af196.tar.gz luafilesystem-fd028d32578fa0b7d5dfc89345f851b02a5af196.tar.bz2 luafilesystem-fd028d32578fa0b7d5dfc89345f851b02a5af196.zip | |
removed umask calls in lfs.mkdir, see kepler-list message from Enrico at 2009-12-27
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 | } |
