Fix tests on Windows

This commit is contained in:
Audrius Butkevicius
2014-08-16 17:33:01 +01:00
parent ace87ad7bb
commit 0c1e60894f
2 changed files with 32 additions and 22 deletions

View File

@@ -13,6 +13,7 @@ import (
"path/filepath"
"runtime"
"strings"
"code.google.com/p/go.text/unicode/norm"
"github.com/syncthing/syncthing/lamport"
@@ -229,7 +230,7 @@ func (w *Walker) ignoreFile(patterns map[string][]string, file string) bool {
for prefix, pats := range patterns {
if prefix == "." || prefix == first || strings.HasPrefix(first, fmt.Sprintf("%s%c", prefix, os.PathSeparator)) {
for _, pattern := range pats {
if match, _ := filepath.Match(pattern, last); match {
if match, _ := filepath.Match(pattern, last); match || pattern == last {
return true
}
}