diff options
author | Reimer Behrends <behrends@gmail.com> | 2014-09-22 23:18:14 +0200 |
---|---|---|
committer | Reimer Behrends <behrends@gmail.com> | 2014-09-22 23:18:14 +0200 |
commit | d0b292b4668e3837c090aefc056867f09fa92ee2 (patch) | |
tree | 6ca0f0b1f06825b99cdf1188d7f7cc31f4903a6c /lib/pure | |
parent | 9f047f4351b100c929153d0070f3cd34752a08e1 (diff) | |
download | Nim-d0b292b4668e3837c090aefc056867f09fa92ee2.tar.gz |
Fix permissions for createDir() on Unix systems.
Permissions were set to 0o711 by default; they should be 0o777, with umask being responsible for restricting permissions further.
Diffstat (limited to 'lib/pure')
-rw-r--r-- | lib/pure/os.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/os.nim b/lib/pure/os.nim index cfff58eb0..71089494f 100644 --- a/lib/pure/os.nim +++ b/lib/pure/os.nim @@ -1332,10 +1332,10 @@ proc removeDir*(dir: string) {.rtl, extern: "nos$1", tags: [ proc rawCreateDir(dir: string) = when defined(solaris): - if mkdir(dir, 0o711) != 0'i32 and errno != EEXIST and errno != ENOSYS: + if mkdir(dir, 0o777) != 0'i32 and errno != EEXIST and errno != ENOSYS: osError(osLastError()) elif defined(unix): - if mkdir(dir, 0o711) != 0'i32 and errno != EEXIST: + if mkdir(dir, 0o777) != 0'i32 and errno != EEXIST: osError(osLastError()) else: when useWinUnicode: |