summaryrefslogtreecommitdiff
path: root/config.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-12-11 13:55:36 -0600
committerJeff Carr <[email protected]>2024-12-11 13:55:36 -0600
commita0b6a435a7c9789f0972321468c5d9a6c19444d2 (patch)
treeb60746516d0b16b3b726947d2442c34d795b01e0 /config.go
parentc1e32828642c500fa621dc819b9be03ab6a4b5ad (diff)
TRUNC new file
Diffstat (limited to 'config.go')
-rw-r--r--config.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/config.go b/config.go
index 3f344e3..38b6518 100644
--- a/config.go
+++ b/config.go
@@ -96,7 +96,7 @@ func loadFile(filename string) ([]byte, error) {
func configWrite(filename string, data []byte) error {
fullname := filepath.Join(os.Getenv("FORGE_GOSRC"), filename)
- cfgfile, err := os.OpenFile(fullname, os.O_RDWR|os.O_CREATE, 0666)
+ cfgfile, err := os.OpenFile(fullname, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644)
defer cfgfile.Close()
if err != nil {
log.Warn("open config file :", err)