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))
}
if originErr != nil {
log.Errorf("build index error: %+v", err)
eMsg = err.Error()
log.Errorf("build index error: %+v", originErr)
eMsg = originErr.Error()
} else {
log.Infof("success build index, count: %d", objCount)
}