mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-23 11:28:59 +00:00
lib/protocol: Accept invalid files without blocks (fixes #4093)
This commit is contained in:
parent
f0492c4eb3
commit
ce0456b5ac
@ -495,8 +495,8 @@ func checkFileInfoConsistency(f FileInfo) error {
|
|||||||
// Directories should have no blocks
|
// Directories should have no blocks
|
||||||
return errDirectoryHasBlocks
|
return errDirectoryHasBlocks
|
||||||
|
|
||||||
case !f.Deleted && f.Type == FileInfoTypeFile && len(f.Blocks) == 0:
|
case !f.Deleted && !f.Invalid && f.Type == FileInfoTypeFile && len(f.Blocks) == 0:
|
||||||
// Non-deleted files should have at least one block
|
// Non-deleted, non-invalid files should have at least one block
|
||||||
return errFileHasNoBlocks
|
return errFileHasNoBlocks
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user