Merge pull request #1913 from Zillode/fix-reset

Fix 'reset' Rest API on windows
This commit is contained in:
Jakob Borg 2015-06-20 11:43:05 +02:00
commit b8b5c5ff34

View File

@ -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)
}