can I just say that Windows paths annoy me?

This commit is contained in:
gutmet 2018-12-09 16:00:36 +01:00
parent b5437f35b6
commit 7f28c08c78

View File

@ -10,7 +10,7 @@ import (
)
func viewHandler(root string, w http.ResponseWriter, r *http.Request) {
file := filepath.Join(root, r.URL.Path[1:])
file := filepath.Join(root, filepath.FromSlash(r.URL.Path[1:]))
info, err := os.Stat(file)
if err != nil {
fmt.Fprint(w, err)