lib/model: GetIgnores: Don't return error for no .stignore file

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4311
This commit is contained in:
Simon Frei
2017-08-22 06:48:25 +00:00
committed by Jakob Borg
parent 0a96a1150b
commit 0ca0e3e9bd
2 changed files with 19 additions and 11 deletions

View File

@@ -1083,6 +1083,11 @@ func TestIgnores(t *testing.T) {
// added to the model and thus there is no initial scan happening.
changeIgnores(t, m, expected)
// Make sure no .stignore file is considered valid
os.Rename("testdata/.stignore", "testdata/.stignore.bak")
changeIgnores(t, m, []string{})
os.Rename("testdata/.stignore.bak", "testdata/.stignore")
}
func TestROScanRecovery(t *testing.T) {