TRUNC new file

This commit is contained in:
Jeff Carr 2024-12-11 13:55:36 -06:00
parent c1e3282864
commit a0b6a435a7
1 changed files with 1 additions and 1 deletions

View File

@ -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)