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:
ppom 2023-09-24 16:00:10 +02:00
parent 87c00030fd
commit a30a6644dc

View File

@ -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)
} }