Skip to content

Commit e974a27

Browse files
YoSevSystem-Glitch
authored andcommitted
fix: change to path.Clean to preserve unix paths even on windows
1 parent 562a13a commit e974a27

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

static.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package goyave
33
import (
44
"io/fs"
55
"net/http"
6-
"path/filepath"
6+
fpath "path"
77
"strings"
88

99
"github.com/samber/lo"
@@ -39,7 +39,7 @@ func cleanStaticPath(fs fs.StatFS, file string) string {
3939
}
4040
path += "index.html"
4141
}
42-
return filepath.Clean(path)
42+
return fpath.Clean(path)
4343
}
4444

4545
func checkStaticPath(path string) bool {

0 commit comments

Comments
 (0)