Locally paused folders will fail on checkFolderRunningLocked() and therefore abort the loop. Avoid this by skipping paused folders directly. Co-authored-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
co-authored by
Jakob Borg
parent
28c660e41d
commit
4d4bfe8032
+6
-1
@@ -877,9 +877,14 @@ func (m *model) Completion(device protocol.DeviceID, folder string) (FolderCompl
|
|||||||
// We want completion for all (shared) folders as an aggregate.
|
// We want completion for all (shared) folders as an aggregate.
|
||||||
var comp FolderCompletion
|
var comp FolderCompletion
|
||||||
for _, fcfg := range m.cfg.FolderList() {
|
for _, fcfg := range m.cfg.FolderList() {
|
||||||
|
if fcfg.Paused {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if device == protocol.LocalDeviceID || fcfg.SharedWith(device) {
|
if device == protocol.LocalDeviceID || fcfg.SharedWith(device) {
|
||||||
folderComp, err := m.folderCompletion(device, fcfg.ID)
|
folderComp, err := m.folderCompletion(device, fcfg.ID)
|
||||||
if err != nil {
|
if errors.Is(err, ErrFolderPaused) {
|
||||||
|
continue
|
||||||
|
} else if err != nil {
|
||||||
return FolderCompletion{}, err
|
return FolderCompletion{}, err
|
||||||
}
|
}
|
||||||
comp.add(folderComp)
|
comp.add(folderComp)
|
||||||
|
|||||||
Reference in New Issue
Block a user