This commit is contained in:
Liang Ding 2016-01-14 15:45:52 +08:00
parent db1f2d29a9
commit 6318f50b59
1 changed files with 6 additions and 0 deletions

View File

@ -108,6 +108,12 @@ func (u *User) Save() bool {
return false return false
} }
if "" == string(bytes) {
logger.Error("Truncated user [" + u.Name + "]")
return false
}
if err = ioutil.WriteFile("conf/users/"+u.Name+".json", bytes, 0644); nil != err { if err = ioutil.WriteFile("conf/users/"+u.Name+".json", bytes, 0644); nil != err {
logger.Error(err) logger.Error(err)