set file permissions at creation

cc #726
This commit is contained in:
Gokcehan committed 2022-01-26 16:52:40 +03:00
1 parent 930364ce78
commit 94e06201f9
5 files changed
+13 -23

No files matched your search

+4
View File
@@ -119,6 +119,10 @@ func setDefaults() {
gOpts.keys["<f-1>"] = &callExpr{"doc", nil, 1}
}
func setUserUmask() {
syscall.Umask(0077)
}
func isExecutable(f os.FileInfo) bool {
return f.Mode()&0111 != 0
}