cmd/syncthing: Incorrect error handling

This commit is contained in:
Jakob Borg 2022-07-28 18:51:22 +02:00
parent 6baa93e13f
commit 6686810943

View File

@ -105,8 +105,8 @@ func getConfig(c APIClient) (config.Configuration, error) {
return cfg, err return cfg, err
} }
err = json.Unmarshal(bytes, &cfg) err = json.Unmarshal(bytes, &cfg)
if err == nil { if err != nil {
return cfg, err return config.Configuration{}, err
} }
return cfg, nil return cfg, nil
} }