Index: src/libchcore/TSubTaskFastMove.cpp =================================================================== diff -u -N -r2efd22688b8d12be34c87bf2b024d8db6e317d60 -ra7834ba278464cb62739f22d35f9bc16269706a1 --- src/libchcore/TSubTaskFastMove.cpp (.../TSubTaskFastMove.cpp) (revision 2efd22688b8d12be34c87bf2b024d8db6e317d60) +++ src/libchcore/TSubTaskFastMove.cpp (.../TSubTaskFastMove.cpp) (revision a7834ba278464cb62739f22d35f9bc16269706a1) @@ -117,16 +117,15 @@ icpf::log_file& rLog = GetContext().GetLog(); IFeedbackHandlerPtr spFeedbackHandler = GetContext().GetFeedbackHandler(); TWorkerThreadController& rThreadController = GetContext().GetThreadController(); - TBasePathDataContainer& rBasePathDataContainer = GetContext().GetBasePathDataContainer(); - TModPathContainer& rBasePaths = GetContext().GetBasePaths(); + TBasePathDataContainerPtr spBasePaths = GetContext().GetBasePaths(); const TConfig& rConfig = GetContext().GetConfig(); TSmartPath pathDestination = GetContext().GetDestinationPath(); rLog.logi(_T("Performing initial fast-move operation...")); // new stats m_tSubTaskStats.SetCurrentBufferIndex(TBufferSizes::eBuffer_Default); - m_tSubTaskStats.SetTotalCount(rBasePaths.GetCount()); + m_tSubTaskStats.SetTotalCount(spBasePaths->GetCount()); m_tSubTaskStats.SetProcessedCount(0); m_tSubTaskStats.SetTotalSize(0); m_tSubTaskStats.SetProcessedSize(0); @@ -149,14 +148,13 @@ bool bRetry = true; bool bSkipInputPath = false; - size_t stSize = rBasePaths.GetCount(); + size_t stSize = spBasePaths->GetCount(); size_t stIndex = m_tProgressInfo.GetCurrentIndex(); for(; stIndex < stSize ; stIndex++) { - size_t stSrcObjectID = rBasePaths.GetOidAt(stIndex); + TBasePathDataPtr spBasePath = spBasePaths->GetAt(stIndex); + TSmartPath pathCurrent = spBasePath->GetSrcPath(); - TSmartPath pathCurrent = rBasePaths.GetAt(stIndex); - // store currently processed index m_tProgressInfo.SetCurrentIndex(stIndex); @@ -166,7 +164,7 @@ // retrieve base path data // check if we want to process this path at all - if(rBasePathDataContainer.GetSkipFurtherProcessing(stSrcObjectID)) + if(spBasePath->GetSkipFurtherProcessing()) continue; TFileInfoPtr spFileInfo(boost::make_shared()); @@ -177,7 +175,7 @@ bRetry = false; // read attributes of src file/folder - bool bExists = TLocalFilesystem::GetFileInfo(pathCurrent, spFileInfo, stIndex, &rBasePaths); + bool bExists = TLocalFilesystem::GetFileInfo(pathCurrent, spFileInfo, spBasePath); if(!bExists) { FEEDBACK_FILEERROR ferr = { pathCurrent.ToString(), NULL, eFastMoveError, ERROR_FILE_NOT_FOUND }; @@ -213,17 +211,17 @@ // does it match the input filter? if(!spFileInfo->IsDirectory() && !afFilters.Match(spFileInfo)) { - rBasePathDataContainer.Get(stSrcObjectID)->SetSkipFurtherProcessing(true); + spBasePath->SetSkipFurtherProcessing(true); continue; } // try to fast move bRetry = true; bool bResult = true; - do + do { TSmartPath pathDestinationPath = CalculateDestinationPath(spFileInfo, pathDestination, 0); - TSmartPath pathSrc = rBasePaths.GetAt(stIndex); + TSmartPath pathSrc = spBasePath->GetSrcPath(); bResult = TLocalFilesystem::FastMove(pathSrc, pathDestinationPath); if(!bResult) { @@ -268,7 +266,7 @@ } } else - rBasePathDataContainer.Get(stSrcObjectID)->SetSkipFurtherProcessing(true); // mark that this path should not be processed any further + spBasePath->SetSkipFurtherProcessing(true); // mark that this path should not be processed any further } while(!bResult && bRetry);