From b56c76f8ad0a54eb8f50189b34e854ea59a1c7b3 Mon Sep 17 00:00:00 2001 From: Lode Hoste Date: Thu, 4 Jun 2015 14:35:03 +0200 Subject: [PATCH] Fix 'reset' Rest API on windows --- cmd/syncthing/gui.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd/syncthing/gui.go b/cmd/syncthing/gui.go index 460a92ad1..578bc6a43 100644 --- a/cmd/syncthing/gui.go +++ b/cmd/syncthing/gui.go @@ -572,7 +572,12 @@ func (s *apiSvc) postSystemReset(w http.ResponseWriter, r *http.Request) { folder := qs.Get("folder") var err error if len(folder) == 0 { - err = resetDB() + for folder := range cfg.Folders() { + err = s.model.ResetFolder(folder) + if err != nil { + break + } + } } else { err = s.model.ResetFolder(folder) }