Matcher checks nil receiver

This commit is contained in:
Audrius Butkevicius
2015-04-27 20:49:10 +01:00
parent 50d377d9fe
commit 77a161a087
3 changed files with 12 additions and 7 deletions

View File

@@ -158,7 +158,7 @@ func (w *Walker) walkAndHashFiles(fchan chan protocol.FileInfo) filepath.WalkFun
}
if sn := filepath.Base(rn); sn == ".stignore" || sn == ".stfolder" ||
strings.HasPrefix(rn, ".stversions") || (w.Matcher != nil && w.Matcher.Match(rn)) {
strings.HasPrefix(rn, ".stversions") || w.Matcher.Match(rn) {
// An ignored file
if debug {
l.Debugln("ignored:", rn)