mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-08 22:31:04 +00:00
lib/model: Return paused summary instead of error on paused folders (#6272)
This commit is contained in:
parent
e782bab9fc
commit
39891cdf42
@ -78,8 +78,8 @@ func (c *folderSummaryService) Summary(folder string) (map[string]interface{}, e
|
|||||||
var res = make(map[string]interface{})
|
var res = make(map[string]interface{})
|
||||||
|
|
||||||
errors, err := c.model.FolderErrors(folder)
|
errors, err := c.model.FolderErrors(folder)
|
||||||
if err != nil && err != ErrFolderPaused {
|
if err != nil && err != ErrFolderPaused && err != errFolderNotRunning {
|
||||||
// Stats from the db can still be obtained if the folder is just paused
|
// Stats from the db can still be obtained if the folder is just paused/being started
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
res["errors"] = len(errors)
|
res["errors"] = len(errors)
|
||||||
|
Loading…
Reference in New Issue
Block a user