fixed savefile screenshot loading bug
parent
b7125a5b24
commit
f5ba2a27d4
|
@ -78,16 +78,22 @@ std::string CGameData::GetFilePath(DataDir dir, const std::string& subpath)
|
||||||
|
|
||||||
for(std::vector<std::string>::reverse_iterator rit = m_dataDirs.rbegin(); rit != m_dataDirs.rend(); ++rit) {
|
for(std::vector<std::string>::reverse_iterator rit = m_dataDirs.rbegin(); rit != m_dataDirs.rend(); ++rit) {
|
||||||
std::stringstream str;
|
std::stringstream str;
|
||||||
str << *rit;
|
|
||||||
str << "/";
|
if ( subpath.find("save") == std::string::npos ){ // if its NOT a path to a savefile screenshot
|
||||||
str << m_standardDataDirs[index];
|
str << *rit;
|
||||||
if (dir == DIR_HELP)
|
str << "/";
|
||||||
{
|
str << m_standardDataDirs[index];
|
||||||
|
|
||||||
|
if (dir == DIR_HELP)
|
||||||
|
{
|
||||||
|
str << "/";
|
||||||
|
str << CApplication::GetInstancePointer()->GetLanguageChar();
|
||||||
|
}
|
||||||
str << "/";
|
str << "/";
|
||||||
str << CApplication::GetInstancePointer()->GetLanguageChar();
|
|
||||||
}
|
}
|
||||||
str << "/";
|
|
||||||
str << subpath;
|
str << subpath;
|
||||||
|
|
||||||
boost::filesystem::path path(str.str());
|
boost::filesystem::path path(str.str());
|
||||||
if(boost::filesystem::exists(path))
|
if(boost::filesystem::exists(path))
|
||||||
{
|
{
|
||||||
|
@ -95,18 +101,9 @@ std::string CGameData::GetFilePath(DataDir dir, const std::string& subpath)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::stringstream str;
|
GetLogger()->Error("file subpath error\n");
|
||||||
str << m_dataDirs[0];
|
|
||||||
str << "/";
|
return "";
|
||||||
str << m_standardDataDirs[index];
|
|
||||||
if (dir == DIR_HELP)
|
|
||||||
{
|
|
||||||
str << "/";
|
|
||||||
str << CApplication::GetInstancePointer()->GetLanguageChar();
|
|
||||||
}
|
|
||||||
str << "/";
|
|
||||||
str << subpath;
|
|
||||||
return str.str();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CGameData::GetDataPath(const std::string &subpath)
|
std::string CGameData::GetDataPath(const std::string &subpath)
|
||||||
|
|
Loading…
Reference in New Issue