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

+1 -5
View File
@@ -25,11 +25,7 @@ func run() {
screen.EnableMouse()
}
f, err := os.Create(gLogPath)
if err != nil {
panic(err)
}
err = os.Chmod(gLogPath, 0600)
f, err := os.OpenFile(gLogPath, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0600)
if err != nil {
panic(err)
}