mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-06 05:17:49 +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
|
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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user