mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-20 07:58:44 +00:00
Changed: Search client_default.cfg also in ETC_RYZOM_PREFIX
--HG-- branch : develop
This commit is contained in:
parent
f1b882c0f3
commit
d113bb7b10
1 changed files with 7 additions and 5 deletions
|
@ -2223,6 +2223,7 @@ bool CClientConfig::getDefaultConfigLocation(std::string& p_name) const
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::string currentPath = CPath::standardizePath(CPath::getCurrentPath());
|
std::string currentPath = CPath::standardizePath(CPath::getCurrentPath());
|
||||||
|
std::string etcPath = CPath::standardizePath(getRyzomEtcPrefix());
|
||||||
|
|
||||||
// look in the current working directory first
|
// look in the current working directory first
|
||||||
if (CFile::isExists(currentPath + defaultConfigFileName))
|
if (CFile::isExists(currentPath + defaultConfigFileName))
|
||||||
|
@ -2232,13 +2233,14 @@ bool CClientConfig::getDefaultConfigLocation(std::string& p_name) const
|
||||||
else if (CFile::isExists(Args.getStartupPath() + defaultConfigFileName))
|
else if (CFile::isExists(Args.getStartupPath() + defaultConfigFileName))
|
||||||
p_name = Args.getStartupPath() + defaultConfigFileName;
|
p_name = Args.getStartupPath() + defaultConfigFileName;
|
||||||
|
|
||||||
// look in prefix path
|
// look in application directory
|
||||||
else if (CFile::isExists(defaultConfigPath + defaultConfigFileName))
|
else if (CFile::isExists(defaultConfigPath + defaultConfigFileName))
|
||||||
p_name = defaultConfigPath + defaultConfigFileName;
|
p_name = defaultConfigPath + defaultConfigFileName;
|
||||||
|
|
||||||
// if some client_default.cfg was found return true
|
// look in etc prefix path
|
||||||
if (p_name.size())
|
else if (!etcPath.empty() && CFile::isExists(etcPath + defaultConfigFileName))
|
||||||
return true;
|
p_name = etcPath + defaultConfigFileName;
|
||||||
|
|
||||||
return false;
|
// if some client_default.cfg was found return true
|
||||||
|
return !p_name.empty();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue