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.
This commit is contained in:
parent
9f047f4351
commit
d0b292b466
1 changed files with 2 additions and 2 deletions
|
|
@ -1332,10 +1332,10 @@ proc removeDir*(dir: string) {.rtl, extern: "nos$1", tags: [
|
||||||
|
|
||||||
proc rawCreateDir(dir: string) =
|
proc rawCreateDir(dir: string) =
|
||||||
when defined(solaris):
|
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())
|
osError(osLastError())
|
||||||
elif defined(unix):
|
elif defined(unix):
|
||||||
if mkdir(dir, 0o711) != 0'i32 and errno != EEXIST:
|
if mkdir(dir, 0o777) != 0'i32 and errno != EEXIST:
|
||||||
osError(osLastError())
|
osError(osLastError())
|
||||||
else:
|
else:
|
||||||
when useWinUnicode:
|
when useWinUnicode:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue