summaryrefslogtreecommitdiff
path: root/config.go
diff options
context:
space:
mode:
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)