mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-23 03:18:59 +00:00
Don't load files from index into suppressed state
This commit is contained in:
parent
e17fa7b14e
commit
3ca8dce98b
@ -369,6 +369,9 @@ func (m *Model) Request(nodeID, repo, name string, offset int64, size int) ([]by
|
|||||||
|
|
||||||
lf := r.Get(cid.LocalID, name)
|
lf := r.Get(cid.LocalID, name)
|
||||||
if lf.Suppressed || lf.Flags&protocol.FlagDeleted != 0 {
|
if lf.Suppressed || lf.Flags&protocol.FlagDeleted != 0 {
|
||||||
|
if debug {
|
||||||
|
l.Debugf("REQ(in): %s: %q / %q o=%d s=%d; invalid: %v", nodeID, repo, name, offset, size, lf)
|
||||||
|
}
|
||||||
return nil, ErrInvalid
|
return nil, ErrInvalid
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -412,6 +415,7 @@ func (m *Model) SeedLocal(repo string, fs []protocol.FileInfo) {
|
|||||||
for i := 0; i < len(fs); i++ {
|
for i := 0; i < len(fs); i++ {
|
||||||
lamport.Default.Tick(fs[i].Version)
|
lamport.Default.Tick(fs[i].Version)
|
||||||
sfs[i] = fileFromFileInfo(fs[i])
|
sfs[i] = fileFromFileInfo(fs[i])
|
||||||
|
sfs[i].Suppressed = false // we might have saved an index with files that were suppressed; the should not be on startup
|
||||||
}
|
}
|
||||||
|
|
||||||
m.rmut.RLock()
|
m.rmut.RLock()
|
||||||
|
Loading…
Reference in New Issue
Block a user