mirror of
https://github.com/SSLMate/certspotter.git
synced 2025-06-27 10:15:33 +02:00
Avoid spurious file not found errors loading STH dir if an STH is concurrently deleted
This commit is contained in:
parent
61b037a708
commit
0c22448e5f
@ -47,7 +47,9 @@ func loadSTHsFromDir(dirPath string) ([]*StoredSTH, error) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
sth, err := readSTHFile(filepath.Join(dirPath, filename))
|
sth, err := readSTHFile(filepath.Join(dirPath, filename))
|
||||||
if err != nil {
|
if errors.Is(err, fs.ErrNotExist) {
|
||||||
|
continue
|
||||||
|
} else if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
sths = append(sths, sth)
|
sths = append(sths, sth)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user