--- a/QTfrontend/team.cpp Tue Aug 13 16:12:54 2013 +0400
+++ b/QTfrontend/team.cpp Fri Aug 16 12:27:41 2013 +0400
@@ -171,7 +171,7 @@
bool HWTeam::loadFromFile()
{
- QSettings teamfile(QString("physfs://Teams/%1.hwt").arg(m_name), QSettings::IniFormat, 0);
+ QSettings teamfile(QString("physfs://Teams/%1.hwt").arg(DataManager::safeFileName(m_name)), QSettings::IniFormat, 0);
teamfile.setIniCodec("UTF-8");
m_name = teamfile.value("Team/Name", m_name).toString();
m_grave = teamfile.value("Team/Grave", "Statue").toString();
@@ -204,7 +204,7 @@
bool HWTeam::fileExists()
{
- QFile f(QString("physfs://Teams/%1.hwt").arg(m_name));
+ QFile f(QString("physfs://Teams/%1.hwt").arg(DataManager::safeFileName(m_name)));
return f.exists();
}
@@ -212,7 +212,7 @@
{
if(m_isNetTeam)
return false;
- QFile cfgfile(QString("physfs://Teams/%1.hwt").arg(m_name));
+ QFile cfgfile(QString("physfs://Teams/%1.hwt").arg(DataManager::safeFileName(m_name)));
cfgfile.remove();
return true;
}
@@ -221,12 +221,12 @@
{
if (OldTeamName != m_name)
{
- QFile cfgfile(QString("physfs://Teams/%1.hwt").arg(OldTeamName));
+ QFile cfgfile(QString("physfs://Teams/%1.hwt").arg(DataManager::safeFileName(OldTeamName)));
cfgfile.remove();
OldTeamName = m_name;
}
- QString fileName = QString("physfs://Teams/%1.hwt").arg(m_name);
+ QString fileName = QString("physfs://Teams/%1.hwt").arg(DataManager::safeFileName(m_name));
DataManager::ensureFileExists(fileName);
QSettings teamfile(fileName, QSettings::IniFormat, 0);
teamfile.setIniCodec("UTF-8");