Fix sudden nil pointer dereference in walk
This commit is contained in:
parent
4a9997e449
commit
37ed5a01e0
@ -240,7 +240,7 @@ func (w *Walker) walkAndHashFiles(fchan, dchan chan protocol.FileInfo) filepath.
|
|||||||
}
|
}
|
||||||
|
|
||||||
if sn := filepath.Base(rn); sn == ".stignore" || sn == ".stfolder" ||
|
if sn := filepath.Base(rn); sn == ".stignore" || sn == ".stfolder" ||
|
||||||
strings.HasPrefix(rn, ".stversions") || w.Matcher.Match(rn) {
|
strings.HasPrefix(rn, ".stversions") || (w.Matcher != nil && w.Matcher.Match(rn)) {
|
||||||
// An ignored file
|
// An ignored file
|
||||||
if debug {
|
if debug {
|
||||||
l.Debugln("ignored:", rn)
|
l.Debugln("ignored:", rn)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user