lib/model: Handle (?d) deletes of directories (fixes #3164)
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3170
This commit is contained in:
committed by
Jakob Borg
parent
b78bfc0a43
commit
915e1ac7de
@@ -246,8 +246,7 @@ func parseIgnoreFile(fd io.Reader, currentFile string, seen map[string]bool) ([]
|
||||
|
||||
addPattern := func(line string) error {
|
||||
pattern := Pattern{
|
||||
pattern: line,
|
||||
result: defaultResult,
|
||||
result: defaultResult,
|
||||
}
|
||||
|
||||
// Allow prefixes to be specified in any order, but only once.
|
||||
@@ -275,6 +274,8 @@ func parseIgnoreFile(fd io.Reader, currentFile string, seen map[string]bool) ([]
|
||||
line = strings.ToLower(line)
|
||||
}
|
||||
|
||||
pattern.pattern = line
|
||||
|
||||
var err error
|
||||
if strings.HasPrefix(line, "/") {
|
||||
// Pattern is rooted in the current dir only
|
||||
|
||||
Reference in New Issue
Block a user