diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/http/http.go | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/http/http.go b/src/http/http.go index 8f49284..9c618e3 100644 --- a/src/http/http.go +++ b/src/http/http.go @@ -95,10 +95,7 @@ func pathHandler(w http.ResponseWriter, r *http.Request) { var dirCount int = 0 var fileCount int = 0 for _, f := range files { - logrus.Tracef("f: %s", f.Name()) - if filterIsValid(f.Name()) == false { - logrus.Tracef("NOPE") continue } @@ -232,18 +229,9 @@ func filterIsValid(name string) bool { } } - logrus.Trace("extension") - extensions := viper.GetStringSlice("hide.extensions") - - splitFileName := strings.Split(name, ".") - fileExtension := splitFileName[len(splitFileName)-1] - logrus.Tracef("fE: %s", fileExtension) - for _, extension := range extensions { - logrus.Tracef("E: %s", extension) - if fileExtension == extension { - logrus.Tracef("E: %s ############################", extension) + if strings.HasSuffix(name, extension) { return false } } |