Fix database presence check
This commit is contained in:
parent
2c1e11648e
commit
909b020089
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue