mirror of
https://github.com/navidrome/navidrome.git
synced 2026-05-03 06:51:16 +00:00
Create Data Folder if it does not exist
This commit is contained in:
parent
c2f40ea8a3
commit
74cf0ee1c1
@ -53,6 +53,11 @@ func Load() {
|
|||||||
fmt.Println("Error parsing config:", err)
|
fmt.Println("Error parsing config:", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
err = os.MkdirAll(Server.DataFolder, os.ModePerm)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println("Error creating data path:", "path", Server.DataFolder, err)
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
Server.ConfigFile = viper.GetViper().ConfigFileUsed()
|
Server.ConfigFile = viper.GetViper().ConfigFileUsed()
|
||||||
if Server.DbPath == "" {
|
if Server.DbPath == "" {
|
||||||
Server.DbPath = filepath.Join(Server.DataFolder, consts.DefaultDbPath)
|
Server.DbPath = filepath.Join(Server.DataFolder, consts.DefaultDbPath)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user