lib/model: Refactor encapsulation of the folder scanning

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3017
This commit is contained in:
Lars K.W. Gohlke
2016-06-29 06:37:34 +00:00
committed by Jakob Borg
parent 4bf3e7485b
commit af0bc95de5
11 changed files with 108 additions and 107 deletions

View File

@@ -86,7 +86,7 @@ type modelIntf interface {
DelayScan(folder string, next time.Duration)
ScanFolder(folder string) error
ScanFolders() map[string]error
ScanFolderSubs(folder string, subs []string) error
ScanFolderSubdirs(folder string, subs []string) error
BringToFront(folder, file string)
ConnectedTo(deviceID protocol.DeviceID) bool
GlobalSize(folder string) (nfiles, deleted int, bytes int64)
@@ -1071,7 +1071,7 @@ func (s *apiService) postDBScan(w http.ResponseWriter, r *http.Request) {
}
subs := qs["sub"]
err = s.model.ScanFolderSubs(folder, subs)
err = s.model.ScanFolderSubdirs(folder, subs)
if err != nil {
http.Error(w, err.Error(), 500)
return