mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-23 03:18:59 +00:00
lib/model: Don't update ignore hash when pull fails
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4522
This commit is contained in:
parent
5f4ed66aa1
commit
6cf01c1d30
@ -239,6 +239,11 @@ func (f *sendReceiveFolder) pull(prevIgnoreHash string) (curIgnoreHash string, s
|
||||
return prevIgnoreHash, true
|
||||
}
|
||||
|
||||
if err := f.CheckHealth(); err != nil {
|
||||
l.Debugln("Skipping pull of", f.Description(), "due to folder error:", err)
|
||||
return prevIgnoreHash, true
|
||||
}
|
||||
|
||||
f.model.fmut.RLock()
|
||||
curIgnores := f.model.folderIgnores[f.folderID]
|
||||
f.model.fmut.RUnlock()
|
||||
@ -246,11 +251,6 @@ func (f *sendReceiveFolder) pull(prevIgnoreHash string) (curIgnoreHash string, s
|
||||
curIgnoreHash = curIgnores.Hash()
|
||||
ignoresChanged := curIgnoreHash != prevIgnoreHash
|
||||
|
||||
if err := f.CheckHealth(); err != nil {
|
||||
l.Debugln("Skipping pull of", f.Description(), "due to folder error:", err)
|
||||
return curIgnoreHash, true
|
||||
}
|
||||
|
||||
l.Debugln(f, "pulling")
|
||||
|
||||
f.setState(FolderSyncing)
|
||||
@ -294,7 +294,11 @@ func (f *sendReceiveFolder) pull(prevIgnoreHash string) (curIgnoreHash string, s
|
||||
|
||||
f.setState(FolderIdle)
|
||||
|
||||
return curIgnoreHash, changed == 0
|
||||
if changed == 0 {
|
||||
return curIgnoreHash, true
|
||||
}
|
||||
|
||||
return prevIgnoreHash, false
|
||||
}
|
||||
|
||||
// pullerIteration runs a single puller iteration for the given folder and
|
||||
|
Loading…
Reference in New Issue
Block a user