parent
25cd8a5490
commit
02b9af2f75
9 changed files with 613 additions and 11 deletions
|
|
@ -1492,7 +1492,7 @@ proc setFilePermissions*(filename: string, permissions: set[FilePermission]) {.
|
|||
if fpOthersWrite in permissions: p = p or S_IWOTH
|
||||
if fpOthersExec in permissions: p = p or S_IXOTH
|
||||
|
||||
if chmod(filename, p) != 0: raiseOSError(osLastError())
|
||||
if chmod(filename, cast[Mode](p)) != 0: raiseOSError(osLastError())
|
||||
else:
|
||||
when useWinUnicode:
|
||||
wrapUnary(res, getFileAttributesW, filename)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue