diff --git a/conf/configuration.go b/conf/configuration.go index 130c11dbe..ea0c85f40 100644 --- a/conf/configuration.go +++ b/conf/configuration.go @@ -71,8 +71,8 @@ func Load() { } func init() { - viper.SetDefault("musicfolder", "./music") - viper.SetDefault("datafolder", "./") + viper.SetDefault("musicfolder", filepath.Join(".", "music")) + viper.SetDefault("datafolder", ".") viper.SetDefault("loglevel", "info") viper.SetDefault("address", "0.0.0.0") viper.SetDefault("port", 4533) diff --git a/consts/consts.go b/consts/consts.go index df31db484..ecb78cd2e 100644 --- a/consts/consts.go +++ b/consts/consts.go @@ -10,7 +10,6 @@ import ( const ( AppName = "navidrome" - LocalConfigFile = "./navidrome.toml" DefaultDbPath = "navidrome.db?cache=shared&_busy_timeout=15000&_journal_mode=WAL&_foreign_keys=on" InitialSetupFlagKey = "InitialSetup" diff --git a/core/file_caches.go b/core/file_caches.go index 28dc9f704..55fe8b6cd 100644 --- a/core/file_caches.go +++ b/core/file_caches.go @@ -26,7 +26,7 @@ func NewFileCache(name, cacheSize, cacheFolder string, maxItems int, getReader R fc := &fileCache{ name: name, cacheSize: cacheSize, - cacheFolder: cacheFolder, + cacheFolder: filepath.FromSlash(cacheFolder), maxItems: maxItems, getReader: getReader, mutex: &sync.RWMutex{},