Fixes records for maps in subfolder. Closes #46

This commit is contained in:
Learath2 2012-05-19 20:43:12 +03:00 committed by heinrich5991
parent 0d7c19889b
commit ec3c96abd6

View file

@ -44,9 +44,11 @@ CFileScore::~CFileScore()
std::string SaveFile()
{
std::ostringstream oss;
char aBuf[256];
str_copy(aBuf, g_Config.m_SvMap, sizeof(aBuf));
for(int i = 0; i < 256; i++) if(aBuf[i] == '/') aBuf[i] = '-';
if (g_Config.m_SvScoreFolder[0])
oss << g_Config.m_SvScoreFolder << "/" << g_Config.m_SvMap
<< "_record.dtb";
oss << g_Config.m_SvScoreFolder << "/" << aBuf << "_record.dtb";
else
oss << g_Config.m_SvMap << "_record.dtb";
return oss.str();