Manual fixup

This commit is contained in:
Audrius Butkevicius
2014-09-28 12:39:39 +01:00
parent 5ec95086f2
commit fdf8ee7015
8 changed files with 89 additions and 88 deletions

View File

@@ -277,7 +277,7 @@ func restGetNeed(m *model.Model, w http.ResponseWriter, r *http.Request) {
var qs = r.URL.Query()
var folder = qs.Get("folder")
files := m.NeedFilesFolderLimited(folder, 100, 2500) // max 100 files or 2500 blocks
files := m.NeedFolderFilesLimited(folder, 100, 2500) // max 100 files or 2500 blocks
w.Header().Set("Content-Type", "application/json; charset=utf-8")
json.NewEncoder(w).Encode(files)

View File

@@ -448,8 +448,8 @@ nextFolder:
// that all files have been deleted which might not be the case,
// so mark it as invalid instead.
if err != nil || !fi.IsDir() {
l.Warnf("Stopping folder %q - directory missing, but has files in index", folder.ID)
cfg.Folders[i].Invalid = "folder directory missing"
l.Warnf("Stopping folder %q - path does not exist, but has files in index", folder.ID)
cfg.Folders[i].Invalid = "folder path missing"
continue nextFolder
}
} else if os.IsNotExist(err) {
@@ -460,7 +460,7 @@ nextFolder:
if err != nil {
// If there was another error or we could not create the
// directory, the folder is invalid.
// path, the folder is invalid.
l.Warnf("Stopping folder %q - %v", err)
cfg.Folders[i].Invalid = err.Error()
continue nextFolder