cmd/syncthing, lib/model: Handle rel/abs paths for config/protected paths (fixes #3183)

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3995
This commit is contained in:
Simon Frei
2017-03-04 07:49:48 +00:00
committed by Jakob Borg
parent 3475a9ab0a
commit c20d612736
2 changed files with 9 additions and 2 deletions

View File

@@ -285,7 +285,8 @@ func (m *Model) warnAboutOverwritingProtectedFiles(folder string) {
}
// check if file is ignored
if ignores.Match(protectedFilePath).IsIgnored() {
relPath, _ := filepath.Rel(folderLocation, protectedFilePath)
if ignores.Match(relPath).IsIgnored() {
continue
}