We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ed9001 commit ee8f8b0Copy full SHA for ee8f8b0
src/ntangle.nim
@@ -94,18 +94,18 @@ proc resetStateVars() =
94
proc parseFilePermissions(octals: string): set[FilePermission] =
95
## Converts the input permissions octal string to a Nim set for FilePermission type.
96
# https://devdocs.io/nim/os#FilePermission
97
- let
+ const
98
readPerms = [fpUserRead, fpGroupRead, fpOthersRead]
99
writePerms = [fpUserWrite, fpGroupWrite, fpOthersWrite]
100
execPerms = [fpUserExec, fpGroupExec, fpOthersExec]
101
for idx, o in octals:
102
if o != '0':
103
if o in {'4', '5', '6', '7'}:
104
- result = result + {readPerms[idx]}
+ result.incl(readPerms[idx])
105
if o in {'2', '3', '6', '7'}:
106
- result = result + {writePerms[idx]}
+ result.incl(writePerms[idx])
107
if o in {'1', '3', '5', '7'}:
108
- result = result + {execPerms[idx]}
+ result.incl(execPerms[idx])
109
dbg "permissions = {result}"
110
111
proc parseTangleHeaderProperties(file: string, lnum: int, haObj: LangAndArgs) =
0 commit comments