Index: src/libchcore/TSubTaskScanDirectory.cpp =================================================================== diff -u -N -rbebda797ec6983535a8940f8f9f15453fe6b1785 -r20aff533ab239b5b41263bb342879b4ea46fdbf6 --- src/libchcore/TSubTaskScanDirectory.cpp (.../TSubTaskScanDirectory.cpp) (revision bebda797ec6983535a8940f8f9f15453fe6b1785) +++ src/libchcore/TSubTaskScanDirectory.cpp (.../TSubTaskScanDirectory.cpp) (revision 20aff533ab239b5b41263bb342879b4ea46fdbf6) @@ -103,6 +103,8 @@ TSubTaskScanDirectories::ESubOperationResult TSubTaskScanDirectories::Exec() { + TSubTaskProcessingGuard guard(m_tSubTaskStats); + // log icpf::log_file& rLog = GetContext().GetLog(); TFileInfoArray& rFilesCache = GetContext().GetFilesCache(); @@ -116,12 +118,22 @@ // reset progress rFilesCache.SetComplete(false); + + // old stats rTaskLocalStats.SetProcessedSize(0); rTaskLocalStats.SetTotalSize(0); rTaskLocalStats.SetCurrentIndex(0); rTaskLocalStats.SetTotalItems(rTaskDefinition.GetSourcePathCount()); rTaskLocalStats.SetCurrentPath(TString()); + // new stats + m_tSubTaskStats.SetCurrentBufferIndex(-1); + m_tSubTaskStats.SetTotalCount(rTaskDefinition.GetSourcePathCount()); + m_tSubTaskStats.SetProcessedCount(0); + m_tSubTaskStats.SetTotalSize(0); + m_tSubTaskStats.SetProcessedSize(0); + m_tSubTaskStats.SetCurrentPath(TString()); + // delete the content of rFilesCache rFilesCache.Clear(); @@ -146,9 +158,14 @@ m_tProgressInfo.SetCurrentIndex(stIndex); + // old stats rTaskLocalStats.SetCurrentIndex(stIndex); rTaskLocalStats.SetCurrentPath(pathCurrent.ToString()); + // new stats + m_tSubTaskStats.SetProcessedCount(stIndex); + m_tSubTaskStats.SetCurrentPath(pathCurrent.ToString()); + bSkipInputPath = false; TFileInfoPtr spFileInfo(boost::make_shared()); @@ -254,9 +271,15 @@ // calc size of all files m_tProgressInfo.SetCurrentIndex(stIndex); + + // old stats rTaskLocalStats.SetCurrentIndex(stIndex); rTaskLocalStats.SetCurrentPath(TString()); + // new stats + m_tSubTaskStats.SetProcessedCount(stIndex); + m_tSubTaskStats.SetCurrentPath(TString()); + rFilesCache.SetComplete(true); // log