lib/model: Don't close file early (fixes #6875) (#6876)

This commit is contained in:
Audrius Butkevicius
2020-08-07 07:49:28 +02:00
committed by Jakob Borg
parent 4faa5882f2
commit 00008994e4
2 changed files with 86 additions and 80 deletions
+1 -1
View File
@@ -1317,10 +1317,10 @@ func (f *sendReceiveFolder) copierRoutine(in <-chan copyBlocksState, pullChan ch
if err != nil {
return false
}
defer fd.Close()
srcOffset := int64(state.file.BlockSize()) * int64(index)
_, err = fd.ReadAt(buf, srcOffset)
fd.Close()
if err != nil {
return false
}