bugfix too many redirects

This commit is contained in:
Robert Janetzko 2023-04-27 12:55:32 +00:00
parent 830ee9bdbc
commit b0302a93b1

View File

@ -108,10 +108,11 @@ func (h loadHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
} }
} }
if err != nil { if err != nil {
httpError(w, err) if !os.IsNotExist(err) {
return httpError(w, err)
}
} }
http.Redirect(w, r, h.server.context.config.SubUri+"/load", http.StatusSeeOther) http.Redirect(w, r, h.server.context.config.SubUri+"/load?p=%2f", http.StatusSeeOther)
} }
func isLegendsXml(f fs.FileInfo) bool { func isLegendsXml(f fs.FileInfo) bool {