mirror of
https://github.com/go-shiori/shiori.git
synced 2025-01-16 21:09:44 +08:00
Prepend environment path to database path
This fixes an error when the `ENV_SHIORI_DB` is defined, it doesn't open a database file because the database file name isn't on the `databasePath` variable.
This commit is contained in:
parent
d167379546
commit
61fbe8fc8c
1 changed files with 1 additions and 1 deletions
2
main.go
2
main.go
|
@ -12,7 +12,7 @@ import (
|
||||||
func main() {
|
func main() {
|
||||||
databasePath := "shiori.db"
|
databasePath := "shiori.db"
|
||||||
if value, found := os.LookupEnv("ENV_SHIORI_DB"); found {
|
if value, found := os.LookupEnv("ENV_SHIORI_DB"); found {
|
||||||
databasePath = value
|
databasePath = value + "/" + databasePath
|
||||||
}
|
}
|
||||||
|
|
||||||
sqliteDB, err := db.OpenSQLiteDatabase(databasePath)
|
sqliteDB, err := db.OpenSQLiteDatabase(databasePath)
|
||||||
|
|
Loading…
Reference in a new issue