Fix possible crash
1 files changed, 2 insertions(+), 2 deletions(-) M pkg/hodhod/static.go
M pkg/hodhod/static.go => pkg/hodhod/static.go +2 -2
@@ 74,10 74,10 @@ func NewFileResp(filename string, req Request, cfg *Config) (resp Response) { } u := *req.Url if isDir && u.Path[len(u.Path)-1] != '/' { if isDir && u.Path != "" && u.Path[len(u.Path)-1] != '/' { u.Path = u.Path + "/" return NewPermRedirectResp(u.String()) } else if !isDir && u.Path[len(u.Path)-1] == '/' { } else if !isDir && u.Path != "" && u.Path[len(u.Path)-1] == '/' { u.Path = u.Path[:len(u.Path)-1] return NewPermRedirectResp(u.String()) }