Index: src/libchcore/TSubTaskBase.cpp =================================================================== diff -u -N -r548382442cbf7bed7f744b279ce3f66b54992724 -r9ba9390b8f79c7a3fd1f9d6d9e92038d92222621 --- src/libchcore/TSubTaskBase.cpp (.../TSubTaskBase.cpp) (revision 548382442cbf7bed7f744b279ce3f66b54992724) +++ src/libchcore/TSubTaskBase.cpp (.../TSubTaskBase.cpp) (revision 9ba9390b8f79c7a3fd1f9d6d9e92038d92222621) @@ -25,7 +25,6 @@ #include "TBasePathData.h" #include "TLocalFilesystem.h" #include "TSubTaskContext.h" -#include "TTaskDefinition.h" #include "TTaskConfiguration.h" #include #include "TFileInfo.h" @@ -93,21 +92,21 @@ // finds another name for a copy of src file(folder) in dest location TSmartPath TSubTaskBase::FindFreeSubstituteName(TSmartPath pathSrcPath, TSmartPath pathDstPath) const { - const TTaskDefinition& rTaskDefinition = GetContext().GetTaskDefinition(); + const TConfig& rConfig = GetContext().GetConfig(); // get the name from src path pathSrcPath.StripSeparatorAtEnd(); TSmartPath pathFilename = pathSrcPath.GetFileName(); // set the dest path - TString strCheckPath = GetTaskPropValue(rTaskDefinition.GetConfiguration()); + TString strCheckPath = GetTaskPropValue(rConfig); strCheckPath.Replace(_T("%name"), pathFilename.ToString()); TSmartPath pathCheckPath(PathFromString(strCheckPath)); // when adding to strDstPath check if the path already exists - if so - try again int iCounter = 1; - TString strFmt = GetTaskPropValue(rTaskDefinition.GetConfiguration()); + TString strFmt = GetTaskPropValue(rConfig); while(TLocalFilesystem::PathExist(pathDstPath + pathCheckPath)) { strCheckPath = strFmt;