bool CSettingTypeApplicationPath::Load(int Index, stdstr & Value) const { bool bRes = CSettingTypeApplication::Load(Index, Value); if (bRes) { if (Value.substr(0, 2) == ".\\" || Value.substr(0, 2) == "./" || Value.substr(0, 3) == "..\\" || Value.substr(0, 3) == "../") { CPath FullFilePath(g_Settings->LoadStringVal(Cmd_BaseDirectory).c_str(), ""), RelativePath(Value); FullFilePath.SetNameExtension(RelativePath.GetNameExtension().c_str()); FullFilePath.AppendDirectory(RelativePath.GetDirectory().c_str()); Value = (const std::string &)FullFilePath; } } return bRes; }
bool CSettingTypeApplicationPath::Load ( int Index, stdstr & Value ) const { bool bRes = CSettingTypeApplication::Load(Index,Value); #ifdef WIN32 if (bRes) { if (Value.substr(0,2) == ".\\" || Value.substr(0,2) == "./" || Value.substr(0,3) == "..\\" || Value.substr(0,3) == "../") { CPath FullFilePath(CPath::MODULE_DIRECTORY), RelativePath(Value); FullFilePath.SetNameExtension(RelativePath.GetNameExtension().c_str()); FullFilePath.AppendDirectory(RelativePath.GetDirectory().c_str()); Value = (const std::string &)FullFilePath; } } #endif return bRes; }