diff --git a/addlicense/main.go b/addlicense/main.go index df6c2a7..01f4e4f 100644 --- a/addlicense/main.go +++ b/addlicense/main.go @@ -295,13 +295,13 @@ func walk(ch chan<- *file, start string, logger *log.Logger) error { // Patterns are assumed to be valid. func fileMatches(path string, patterns []string) bool { for _, p := range patterns { - + if runtime.GOOS == "windows" { // If on windows, change path seperators to / - // in order for patterns to compare correctly + // in order for patterns to compare correctly path = filepath.ToSlash(path) } - + // ignore error, since we assume patterns are valid if match, _ := doublestar.Match(p, path); match { return true @@ -412,6 +412,7 @@ var head = []string{ "