Fix bug with excludeDirs and subdirectories
diff --git a/cfg/config.go b/cfg/config.go
index f3af3f5..afeed9a 100644
--- a/cfg/config.go
+++ b/cfg/config.go
@@ -163,8 +163,9 @@
// HasExclude returns true if the given name is listed on the exclude list.
func (c *Config) HasExclude(ex string) bool {
+ ep := normalizeSlash(ex)
for _, v := range c.Exclude {
- if v == ex {
+ if vp := normalizeSlash(v); vp == ep {
return true
}
}
@@ -543,3 +544,7 @@
return ""
}
}
+
+func normalizeSlash(k string) string {
+ return strings.Replace(k, "\\", "/", -1)
+}