about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/http/http.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/http/http.go b/src/http/http.go
index cdfdf68..17b0963 100644
--- a/src/http/http.go
+++ b/src/http/http.go
@@ -98,8 +98,7 @@ func pathHandler(w http.ResponseWriter, r *http.Request) {
 	for _, f := range files {
 		logrus.Tracef("f: %s", f.Name())
 
-		filterResult := filterIsValid(f.Name())
-		if filterResult == true {
+		if filterIsValid(f.Name()) == false {
 			continue
 		}
 
@@ -229,22 +228,23 @@ func filterIsValid(name string) bool {
 
 	// hide files starting with a dot if the "hide.file" directive is set
 	if viper.GetBool("hide.files") == true {
-		logrus.Info("checking hide")
-		if name[0] != '.' {
-			logrus.Info("hide")
+		if name[0] == '.' {
 			return false
 		}
 	}
 
+	logrus.Info("extension")
+
 	extensions := viper.GetStringSlice("hide.extensions")
 
 	splitFileName := strings.Split(name, ".")
 	fileExtension := splitFileName[len(splitFileName)-1]
+	logrus.Infof("fE: %s", fileExtension)
 
 	for _, extension := range extensions {
+		logrus.Infof("E: %s", extension)
 		if fileExtension == extension {
-			logrus.Info("extension")
-			logrus.Info(extension)
+			logrus.Infof("E: %s ############################", extension)
 			return false
 		}
 	}