Index: src/libchcore/TSubTaskCopyMove.cpp =================================================================== diff -u -N -ra476ced2f2235ee21c69176e88eba1cf7aea861f -rc66b22f786f8434075a09e92de52bba8a53a85db --- src/libchcore/TSubTaskCopyMove.cpp (.../TSubTaskCopyMove.cpp) (revision a476ced2f2235ee21c69176e88eba1cf7aea861f) +++ src/libchcore/TSubTaskCopyMove.cpp (.../TSubTaskCopyMove.cpp) (revision c66b22f786f8434075a09e92de52bba8a53a85db) @@ -90,9 +90,13 @@ // initialize stats if not resuming (when resuming we have already initialized // the stats once - it is being restored in Load() too). - if(!m_tSubTaskStats.IsInitialized()) - { + if (!m_tSubTaskStats.IsInitialized()) m_tSubTaskStats.Init(TBufferSizes::eBuffer_Default, rFilesCache.GetSize(), 0, rFilesCache.CalculateTotalSize(), rFilesCache.CalculatePartialSize(m_tSubTaskStats.GetCurrentIndex()), TString()); + else + { + _ASSERTE(rFilesCache.GetSize() == m_tSubTaskStats.GetTotalCount()); + if (rFilesCache.GetSize() != m_tSubTaskStats.GetTotalCount()) + THROW_CORE_EXCEPTION(eErr_InternalProblem); } // now it's time to check if there is enough space on destination device