Skip to content

Commit

Permalink
v0.1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Kurilov committed Dec 8, 2017
1 parent b469359 commit d6ac807
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,9 @@ static <I extends DataItem, O extends DataIoTask<I>> boolean invokeOverwrite(
final I fileItem, final O ioTask, final FileChannel dstChannel
) throws IOException {
long countBytesDone = ioTask.getCountBytesDone();
if(countBytesDone == 0) {
dstChannel.position(countBytesDone);
}
final long fileSize = fileItem.size();
if(countBytesDone < fileSize && IoTask.Status.ACTIVE.equals(ioTask.getStatus())) {
countBytesDone += fileItem.writeToFileChannel(dstChannel, fileSize - countBytesDone);
Expand Down

0 comments on commit d6ac807

Please sign in to comment.