mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-23 03:18:59 +00:00
Ignore all paths within .stversions folder
This commit is contained in:
parent
d4199c2d08
commit
33267f2178
BIN
internal/model/testdata/.syncthing.file
vendored
BIN
internal/model/testdata/.syncthing.file
vendored
Binary file not shown.
@ -20,6 +20,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"code.google.com/p/go.text/unicode/norm"
|
"code.google.com/p/go.text/unicode/norm"
|
||||||
|
|
||||||
@ -113,8 +114,8 @@ func (w *Walker) walkAndHashFiles(fchan chan protocol.FileInfo) filepath.WalkFun
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if sn := filepath.Base(rn); sn == ".stignore" || sn == ".stversions" ||
|
if sn := filepath.Base(rn); sn == ".stignore" || sn == ".stfolder" ||
|
||||||
sn == ".stfolder" || (w.Matcher != nil && 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…
Reference in New Issue
Block a user