From a30a6644dcf5e5f6efb55d12050e9f114523ddfb Mon Sep 17 00:00:00 2001 From: ppom <> Date: Sun, 24 Sep 2023 16:00:10 +0200 Subject: [PATCH] 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 --- app/persist.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/persist.go b/app/persist.go index d273ad1..083271f 100644 --- a/app/persist.go +++ b/app/persist.go @@ -101,7 +101,7 @@ func (c *Conf) RotateDB(startup bool) (*WriteDB, *WriteDB) { } err = os.Remove(flushDBName) - if err != nil { + if err != nil && !errors.Is(err, os.ErrNotExist) { log.Fatalln("FATAL Failed to delete old DB:", err) }