From a0b6a435a7c9789f0972321468c5d9a6c19444d2 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 11 Dec 2024 13:55:36 -0600 Subject: [PATCH] TRUNC new file --- config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)