Skip to content

file_unix: only update sizeProcessed once per iteration

Ahmad Samir requested to merge work/ahmad/jobtest into master

In a previous commit the code was changed to use sizeProcessed as the offset args in the copy_file_range() call, but it also updated sizeProcessed at the end of the while loop, remove the one at the end of the loop.

Confirmed by: static int counter; qDebug() << sizeProcessed << ++counter;

and using the unit test: build/bin/jobtest -v1 cancelCopyAndCleanDest

now I get counter 1 2 for a 1MB file size, before this change the code only iterated once through the while loop.

Edited by Ahmad Samir

Merge request reports