mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-10 07:11:08 +00:00
cmd/syncthing: Incorrect error handling
This commit is contained in:
parent
6baa93e13f
commit
6686810943
@ -105,8 +105,8 @@ func getConfig(c APIClient) (config.Configuration, error) {
|
||||
return cfg, err
|
||||
}
|
||||
err = json.Unmarshal(bytes, &cfg)
|
||||
if err == nil {
|
||||
return cfg, err
|
||||
if err != nil {
|
||||
return config.Configuration{}, err
|
||||
}
|
||||
return cfg, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user