1
0
Fork 0

Fix inverted file open logic

This commit is contained in:
Gregory Eremin 2015-01-18 18:42:29 +07:00
parent 0baecc0a6f
commit f963ccc672
1 changed files with 2 additions and 2 deletions

View File

@ -20,13 +20,13 @@ func (cf *configFile) write(b []byte) (err error) {
) )
if cf.isExist() { if cf.isExist() {
fd, err = os.Open(cf.path)
} else {
if err = cf.mkdirp(); err != nil { if err = cf.mkdirp(); err != nil {
return return
} }
fd, err = os.Create(cf.path) fd, err = os.Create(cf.path)
} else {
fd, err = os.Open(cf.path)
} }
if err != nil { if err != nil {
return return