Avoid spurious file not found errors loading STH dir if an STH is concurrently deleted

This commit is contained in:
Andrew Ayer 2025-05-20 15:29:23 -04:00
parent 61b037a708
commit 0c22448e5f

View File

@ -47,7 +47,9 @@ func loadSTHsFromDir(dirPath string) ([]*StoredSTH, error) {
continue
}
sth, err := readSTHFile(filepath.Join(dirPath, filename))
if err != nil {
if errors.Is(err, fs.ErrNotExist) {
continue
} else if err != nil {
return nil, err
}
sths = append(sths, sth)