🎨 Remove box conf if parse failed

This commit is contained in:
Daniel 2023-07-21 20:23:37 +08:00
parent c2a6e6560a
commit abd1030cb8
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -123,6 +123,7 @@ func ListNotebooks() (ret []*Box, err error) {
}
if readErr = gulu.JSON.UnmarshalJSON(data, boxConf); nil != readErr {
logging.LogErrorf("parse box conf [%s] failed: %s", boxConfPath, readErr)
os.RemoveAll(boxConfPath)
continue
}