Fixed: Use full path for client_default.cfg

This commit is contained in:
kervala 2016-02-23 16:58:07 +01:00
parent 6b399be0f6
commit c70095d428

View file

@ -2222,9 +2222,11 @@ bool CClientConfig::getDefaultConfigLocation(std::string& p_name) const
defaultConfigPath = Args.getProgramPath();
#endif
std::string currentPath = CPath::standardizePath(CPath::getCurrentPath());
// look in the current working directory first
if (CFile::isExists(defaultConfigFileName))
p_name = defaultConfigFileName;
if (CFile::isExists(currentPath + defaultConfigFileName))
p_name = currentPath + defaultConfigFileName;
// look in startup directory
else if (CFile::isExists(Args.getStartupPath() + defaultConfigFileName))