diff options
| author | Matt Holt <mholt@users.noreply.github.com> | 2020-11-02 14:20:12 -0700 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-02 14:20:12 -0700 | 
| commit | 8d038ca515ffaa4d37dca05a95181203b2db64e7 (patch) | |
| tree | 09ec23687cebfe468f8079ad86facf4d40a7c31c /modules/caddyhttp/fileserver/matcher.go | |
| parent | 937ec342010894f7a6239883b10f6a107ff82c9f (diff) | |
fileserver: Improve and clarify file hiding logic (#3844)
* fileserver: Improve and clarify file hiding logic
* Oops, forgot to run integration tests
* Make this one integration test OS-agnostic
* See if this appeases the Windows gods
* D'oh
Diffstat (limited to 'modules/caddyhttp/fileserver/matcher.go')
| -rw-r--r-- | modules/caddyhttp/fileserver/matcher.go | 3 | 
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/caddyhttp/fileserver/matcher.go b/modules/caddyhttp/fileserver/matcher.go index 475a9ee..c103b03 100644 --- a/modules/caddyhttp/fileserver/matcher.go +++ b/modules/caddyhttp/fileserver/matcher.go @@ -19,7 +19,6 @@ import (  	"net/http"  	"os"  	"path" -	"path/filepath"  	"strings"  	"time" @@ -286,7 +285,7 @@ func strictFileExists(file string) (os.FileInfo, bool) {  		// https://stackoverflow.com/a/12518877/1048862  		return nil, false  	} -	if strings.HasSuffix(file, string(filepath.Separator)) { +	if strings.HasSuffix(file, separator) {  		// by convention, file paths ending  		// in a path separator must be a directory  		return stat, stat.IsDir()  | 
