diff --git a/irc/database.go b/irc/database.go index 12c9b83d..9ec437ab 100644 --- a/irc/database.go +++ b/irc/database.go @@ -156,6 +156,12 @@ func performAutoUpgrade(currentVersion string, config *Config) (err error) { // UpgradeDB upgrades the datastore to the latest schema. func UpgradeDB(config *Config) (err error) { + // #715: test that the database exists + _, err = os.Stat(config.Datastore.Path) + if err != nil { + return err + } + store, err := buntdb.Open(config.Datastore.Path) if err != nil { return err