mirror of
https://github.com/syncthing/syncthing.git
synced 2024-11-16 10:28:49 -07:00
lib/model: Improve errors while pulling (#5474)
This commit is contained in:
parent
42bd42df5a
commit
a45ba70467
@ -64,7 +64,7 @@ var (
|
||||
errSymlinksUnsupported = errors.New("symlinks not supported")
|
||||
errDirHasToBeScanned = errors.New("directory contains unexpected files, scheduling scan")
|
||||
errDirHasIgnored = errors.New("directory contains ignored files (see ignore documentation for (?d) prefix)")
|
||||
errDirNotEmpty = errors.New("directory is not empty")
|
||||
errDirNotEmpty = errors.New("directory is not empty; files within are probably ignored on connected devices only")
|
||||
errNotAvailable = errors.New("no connected device has the required version of this file")
|
||||
errModified = errors.New("file modified but not rescanned; will try again later")
|
||||
)
|
||||
@ -1397,7 +1397,8 @@ func (f *sendReceiveFolder) pullBlock(state pullBlockState, out chan<- *sharedPu
|
||||
// Fetch the block, while marking the selected device as in use so that
|
||||
// leastBusy can select another device when someone else asks.
|
||||
activity.using(selected)
|
||||
buf, lastError := f.model.requestGlobal(selected.ID, f.folderID, state.file.Name, state.block.Offset, int(state.block.Size), state.block.Hash, state.block.WeakHash, selected.FromTemporary)
|
||||
var buf []byte
|
||||
buf, lastError = f.model.requestGlobal(selected.ID, f.folderID, state.file.Name, state.block.Offset, int(state.block.Size), state.block.Hash, state.block.WeakHash, selected.FromTemporary)
|
||||
activity.done(selected)
|
||||
if lastError != nil {
|
||||
l.Debugln("request:", f.folderID, state.file.Name, state.block.Offset, state.block.Size, "returned error:", lastError)
|
||||
|
Loading…
Reference in New Issue
Block a user