all repos — homestead @ 11b40229600cb8f0ff46a538cfcff46908830c8f

Code for my website

do not trim trailing slashes if trimmed path isn't registered

Alan Pearce
commit

11b40229600cb8f0ff46a538cfcff46908830c8f

parent

59aa24e05234e5e4edd01ff6902c88b837a2e746

1 file changed, 1 insertion(+), 2 deletions(-)

jump to
M internal/storage/files/reader.gointernal/storage/files/reader.go
@@ -89,10 +89,9 @@ case !strings.HasSuffix(path, "/") && r.files[path+"/"] != nil:
cPath, differs = path+"/", true case strings.HasSuffix(path, "/"): - if cPath, differs = strings.CutSuffix(path, "/"); differs && r.files[cPath] != nil { + if cPath, differs := strings.CutSuffix(path, "/"); differs && r.files[cPath] != nil { return cPath, differs } - } return cPath, differs