Fix 'reset' Rest API on windows

This commit is contained in:
Lode Hoste 2015-06-04 14:35:03 +02:00
parent 69af77a3bd
commit b56c76f8ad

View File

@ -572,7 +572,12 @@ func (s *apiSvc) postSystemReset(w http.ResponseWriter, r *http.Request) {
folder := qs.Get("folder") folder := qs.Get("folder")
var err error var err error
if len(folder) == 0 { if len(folder) == 0 {
err = resetDB() for folder := range cfg.Folders() {
err = s.model.ResetFolder(folder)
if err != nil {
break
}
}
} else { } else {
err = s.model.ResetFolder(folder) err = s.model.ResetFolder(folder)
} }