fix: trailing spaces in watch folders, improve root folder matching, and log walk errors
This commit is contained in:
@@ -104,6 +104,7 @@ func (s *Server) handleAddWatchFolder(w http.ResponseWriter, r *http.Request) {
|
||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
f.FolderPath = strings.TrimSpace(f.FolderPath)
|
||||
f.Enabled = true
|
||||
if err := db.AddWatchFolder(f); err != nil {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
|
||||
Reference in New Issue
Block a user