diff --git a/config.go b/config.go index 7418eca4..65d53d44 100644 --- a/config.go +++ b/config.go @@ -299,7 +299,10 @@ func (c *Config) NewStores(ctx context.Context, case DatabaseBackendSqlite: // Before we initialize the SQLite store, we'll make sure that // the directory where we will store the database file exists. - err := makeDirectories(networkDir) + // Note that the c.Sqlite.DatabaseFileName may already have + // overwritten in loadAndValidateConfig, so that the correct + // network folder has been chosen. + err := makeDirectories(filepath.Dir(c.Sqlite.DatabaseFileName)) if err != nil { return stores, err }