fixing small logic issue

pull/4/head
Loren Brindze 6 years ago
parent 8d22572a41
commit ac90e987b8
  1. 2
      serve.go

@ -176,7 +176,7 @@ func main() {
// will attempt to retrieve the index file of that directory.
func handleListing(show bool, serve http.HandlerFunc) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
if show || strings.HasSuffix(r.URL.Path, "/") {
if !show && strings.HasSuffix(r.URL.Path, "/") {
http.NotFound(w, r)
return
}

Loading…
Cancel
Save