Index: src/libchcore/TSubTaskDelete.cpp =================================================================== diff -u -N -rbebda797ec6983535a8940f8f9f15453fe6b1785 -r20aff533ab239b5b41263bb342879b4ea46fdbf6 --- src/libchcore/TSubTaskDelete.cpp (.../TSubTaskDelete.cpp) (revision bebda797ec6983535a8940f8f9f15453fe6b1785) +++ src/libchcore/TSubTaskDelete.cpp (.../TSubTaskDelete.cpp) (revision 20aff533ab239b5b41263bb342879b4ea46fdbf6) @@ -99,6 +99,8 @@ TSubTaskBase::ESubOperationResult TSubTaskDelete::Exec() { + TSubTaskProcessingGuard guard(m_tSubTaskStats); + // log icpf::log_file& rLog = GetContext().GetLog(); TFileInfoArray& rFilesCache = GetContext().GetFilesCache(); @@ -110,12 +112,21 @@ // log rLog.logi(_T("Deleting files (DeleteFiles)...")); + // old stats rTaskLocalStats.SetProcessedSize(0); rTaskLocalStats.SetTotalSize(0); rTaskLocalStats.SetCurrentIndex(0); rTaskLocalStats.SetTotalItems(rFilesCache.GetSize()); rTaskLocalStats.SetCurrentPath(TString()); + // new stats + m_tSubTaskStats.SetCurrentBufferIndex(-1); + m_tSubTaskStats.SetTotalCount(rFilesCache.GetSize()); + m_tSubTaskStats.SetProcessedCount(0); + m_tSubTaskStats.SetTotalSize(0); + m_tSubTaskStats.SetProcessedSize(0); + m_tSubTaskStats.SetCurrentPath(TString()); + // current processed path BOOL bSuccess; TFileInfoPtr spFileInfo; @@ -129,9 +140,14 @@ m_tProgressInfo.SetCurrentIndex(stIndex); + // old stats rTaskLocalStats.SetCurrentIndex(stIndex); rTaskLocalStats.SetCurrentPath(spFileInfo->GetFullFilePath().ToString()); + // new stats + m_tSubTaskStats.SetProcessedCount(stIndex); + m_tSubTaskStats.SetCurrentPath(spFileInfo->GetFullFilePath().ToString()); + // check for kill flag if(rThreadController.KillRequested()) { @@ -199,9 +215,15 @@ }//while m_tProgressInfo.SetCurrentIndex(stIndex); + + // old stats rTaskLocalStats.SetCurrentIndex(stIndex); rTaskLocalStats.SetCurrentPath(TString()); + // new stats + m_tSubTaskStats.SetProcessedCount(stIndex); + m_tSubTaskStats.SetCurrentPath(TString()); + // log rLog.logi(_T("Deleting files finished"));