mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-05 21:07:58 +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