fix(index): nil pointer call

This commit is contained in:
Noah Hsu 2022-12-05 20:18:50 +08:00
parent 5b7aa9c1cf
commit dda1da4576

View File

@ -75,8 +75,8 @@ func BuildIndex(ctx context.Context, indexPaths, ignorePaths []string, maxDepth
objCount = objCount + uint64(len(messages)) objCount = objCount + uint64(len(messages))
} }
if originErr != nil { if originErr != nil {
log.Errorf("build index error: %+v", err) log.Errorf("build index error: %+v", originErr)
eMsg = err.Error() eMsg = originErr.Error()
} else { } else {
log.Infof("success build index, count: %d", objCount) log.Infof("success build index, count: %d", objCount)
} }