Skip to content

Commit

Permalink
lib/api: Improve ignore loading error handling (fixes #9253) (#9254)
Browse files Browse the repository at this point in the history
  • Loading branch information
calmh committed Dec 4, 2023
1 parent 5bfc540 commit 7b1932d
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions lib/api/api.go
Expand Up @@ -47,7 +47,6 @@ import (
"github.com/syncthing/syncthing/lib/discover"
"github.com/syncthing/syncthing/lib/events"
"github.com/syncthing/syncthing/lib/fs"
"github.com/syncthing/syncthing/lib/ignore"
"github.com/syncthing/syncthing/lib/locations"
"github.com/syncthing/syncthing/lib/logger"
"github.com/syncthing/syncthing/lib/model"
Expand Down Expand Up @@ -1349,11 +1348,6 @@ func (s *service) getDBIgnores(w http.ResponseWriter, r *http.Request) {
folder := qs.Get("folder")

lines, patterns, err := s.model.LoadIgnores(folder)
if err != nil && !ignore.IsParseError(err) {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}

sendJSON(w, map[string]interface{}{
"ignore": lines,
"expanded": patterns,
Expand Down

0 comments on commit 7b1932d

Please sign in to comment.