Index: src/libchcore/TSubTaskBase.cpp =================================================================== diff -u -N -r2fe97a93f21771d75901d4b6559057d1ea055104 -r9ebcc7abf1e0e70f0db2d08b2691351a26ef259b --- src/libchcore/TSubTaskBase.cpp (.../TSubTaskBase.cpp) (revision 2fe97a93f21771d75901d4b6559057d1ea055104) +++ src/libchcore/TSubTaskBase.cpp (.../TSubTaskBase.cpp) (revision 9ebcc7abf1e0e70f0db2d08b2691351a26ef259b) @@ -37,7 +37,7 @@ // TSubTaskBase TSubTaskBase::TSubTaskBase(TSubTaskContext& rContext) : -m_rContext(rContext) + m_rContext(rContext) { } @@ -47,6 +47,8 @@ TSmartPath TSubTaskBase::CalculateDestinationPath(const TFileInfoPtr& spFileInfo, TSmartPath pathDst, int iFlags) { + IFilesystemPtr spFilesystem = GetContext().GetLocalFilesystem(); + if(!spFileInfo) THROW_CORE_EXCEPTION(eErr_InvalidArgument); @@ -57,7 +59,7 @@ TSmartPath pathCombined = pathDst + spFileInfo->GetFullFilePath().GetFileDir(); // force create directory - TLocalFilesystem::CreateDirectory(pathCombined, true); + spFilesystem->CreateDirectory(pathCombined, true); return pathCombined + spFileInfo->GetFullFilePath().GetFileName(); } @@ -91,6 +93,7 @@ TSmartPath TSubTaskBase::FindFreeSubstituteName(TSmartPath pathSrcPath, TSmartPath pathDstPath) const { const TConfig& rConfig = GetContext().GetConfig(); + IFilesystemPtr spFilesystem = GetContext().GetLocalFilesystem(); // get the name from src path pathSrcPath.StripSeparatorAtEnd(); @@ -105,7 +108,7 @@ // when adding to strDstPath check if the path already exists - if so - try again int iCounter = 1; TString strFmt = GetTaskPropValue(rConfig); - while(TLocalFilesystem::PathExist(pathDstPath + pathCheckPath)) + while(spFilesystem->PathExist(pathDstPath + pathCheckPath)) { strCheckPath = strFmt; strCheckPath.Replace(_t("%name"), pathFilename.ToString());