From ac90e987b8a8fe24dd21c764f4340370dd00cdcb Mon Sep 17 00:00:00 2001 From: Loren Brindze Date: Wed, 18 Apr 2018 09:48:21 -0700 Subject: [PATCH] fixing small logic issue --- serve.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serve.go b/serve.go index dc74f4d..0e79b81 100644 --- a/serve.go +++ b/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 }