Fix: dont die if trying to delete unexistant DB
It can happen if reaction-flushes.db has never existed but reaction-matches does, on first run-time database rotation
This commit is contained in:
parent
87c00030fd
commit
a30a6644dc
@ -101,7 +101,7 @@ func (c *Conf) RotateDB(startup bool) (*WriteDB, *WriteDB) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
err = os.Remove(flushDBName)
|
err = os.Remove(flushDBName)
|
||||||
if err != nil {
|
if err != nil && !errors.Is(err, os.ErrNotExist) {
|
||||||
log.Fatalln("FATAL Failed to delete old DB:", err)
|
log.Fatalln("FATAL Failed to delete old DB:", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user