Index: src/libchcore/TSubTaskCopyMove.cpp =================================================================== diff -u -N -r121d674474766192b5bf02afda67fb962635f56b -ree9b975618a07beb840aca724732da87b522d54b --- src/libchcore/TSubTaskCopyMove.cpp (.../TSubTaskCopyMove.cpp) (revision 121d674474766192b5bf02afda67fb962635f56b) +++ src/libchcore/TSubTaskCopyMove.cpp (.../TSubTaskCopyMove.cpp) (revision ee9b975618a07beb840aca724732da87b522d54b) @@ -554,13 +554,20 @@ return TSubTaskBase::eSubResult_Continue; } - // ullSeekTo (== m_tSubTaskStats.GetCurrentItemProcessedSize()) is already a part of stats - // so the only correction that might need to be done is subtracting the difference - // between stored last file position (aka ullSeekTo) and the real position - // to which the file pos was set to. - m_tSubTaskStats.SetCurrentItemProcessedSize(ullMove); - if(ullMove < ullSeekTo) - m_tSubTaskStats.DecreaseProcessedSize(ullSeekTo - ullMove); + // adjust the stats for the difference between what was already processed and what will now be considered processed + unsigned long long ullCurrentProcessedSize = m_tSubTaskStats.GetCurrentItemProcessedSize(); + if (ullMove > ullCurrentProcessedSize) + { + unsigned long long ullDiff = ullMove - ullCurrentProcessedSize; + m_tSubTaskStats.IncreaseCurrentItemProcessedSize(ullDiff); + m_tSubTaskStats.IncreaseProcessedSize(ullDiff); + } + else if (ullMove < ullCurrentProcessedSize) + { + unsigned long long ullDiff = ullCurrentProcessedSize - ullMove; + m_tSubTaskStats.DecreaseCurrentItemProcessedSize(ullDiff); + m_tSubTaskStats.DecreaseProcessedSize(ullDiff); + } } // if the destination file already exists - truncate it to the current file position