Compare commits
2 Commits
238f4cf682
...
e772ecf2ab
Author | SHA1 | Date | |
---|---|---|---|
e772ecf2ab | |||
3e0c110893 |
@ -71,6 +71,6 @@ func init() {
|
||||
|
||||
DBPath = filepath.Join(CacheDir, "db")
|
||||
|
||||
_, err = os.ReadDir(DBPath)
|
||||
DBPresent = err == nil
|
||||
fi, err := os.Stat(DBPath)
|
||||
DBPresent = err == nil && !fi.IsDir()
|
||||
}
|
||||
|
@ -107,6 +107,7 @@ func Init(db *sqlx.DB, dsn string) error {
|
||||
|
||||
ver, ok := GetVersion(db)
|
||||
if !ok {
|
||||
log.Warn("Database version does not exist. Run lure fix if something isn't working.").Send()
|
||||
return addVersion(db, CurrentVersion)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user