Skip to content

Commit

Permalink
When taking a chunk from the self seed, immediately return
Browse files Browse the repository at this point in the history
If we were able to take a chunk from the self seed, there is no need to
continue looking into the existing file and the store.

Signed-off-by: Ludovico de Nittis <[email protected]>
  • Loading branch information
RyuzakiKK committed Apr 15, 2022
1 parent 0b32242 commit 1f0831f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions assemble.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ func writeChunk(c IndexChunk, ss *selfSeed, f *os.File, blocksize uint64, s Stor
}
stats.addBytesCopied(copied)
stats.addBytesCloned(cloned)
return nil
}

// If we operate on an existing file there's a good chance we already
Expand Down

0 comments on commit 1f0831f

Please sign in to comment.