Merge pull request #4 from lb-saildrone/master

fixing small logic issue
This commit is contained in:
Jeromy Streets 2018-04-18 19:30:07 -07:00 committed by GitHub
commit 571765d935
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -176,7 +176,7 @@ func main() {
// will attempt to retrieve the index file of that directory. // will attempt to retrieve the index file of that directory.
func handleListing(show bool, serve http.HandlerFunc) http.HandlerFunc { func handleListing(show bool, serve http.HandlerFunc) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) { 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) http.NotFound(w, r)
return return
} }