lib/model: Handle (?d) deletes of directories (fixes #3164)

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3170
This commit is contained in:
Audrius Butkevicius
2016-05-23 23:32:08 +00:00
committed by Jakob Borg
parent b78bfc0a43
commit 915e1ac7de
4 changed files with 117 additions and 4 deletions
+3 -2
View File
@@ -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