Fix config file opening
This commit is contained in:
parent
95f17f03a2
commit
2549ac18fe
|
@ -20,7 +20,7 @@ func (cf *configFile) write(b []byte) (err error) {
|
||||||
)
|
)
|
||||||
|
|
||||||
if cf.isExist() {
|
if cf.isExist() {
|
||||||
fd, err = os.Open(cf.path)
|
fd, err = os.OpenFile(cf.path, os.O_TRUNC|os.O_WRONLY, 0633)
|
||||||
} else {
|
} else {
|
||||||
if err = cf.mkdirp(); err != nil {
|
if err = cf.mkdirp(); err != nil {
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue