mirror of https://github.com/stashapp/stash.git
Fixed crash on first launch
This commit is contained in:
parent
d0431a02f1
commit
d0331c53dc
|
@ -25,7 +25,7 @@ func LoadConfigFile(file string) *Config {
|
|||
jsonParser := json.NewDecoder(configFile)
|
||||
parseError := jsonParser.Decode(&config)
|
||||
if parseError != nil {
|
||||
logger.Errorf("config file parse error: %s", parseError)
|
||||
logger.Errorf("config file parse error (ignore on first launch): %s", parseError)
|
||||
}
|
||||
return &config
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ func GetInstance() *singleton {
|
|||
|
||||
func Initialize() *singleton {
|
||||
once.Do(func() {
|
||||
_ = utils.EnsureDir(paths.StaticPaths.ConfigDirectory)
|
||||
configFile := jsonschema.LoadConfigFile(paths.StaticPaths.ConfigFile)
|
||||
instance = &singleton{
|
||||
Status: Idle,
|
||||
|
|
Loading…
Reference in New Issue