mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-27 01:06:19 +00:00
Changed: Use ClientCfg.getDefaultConfigLocation to get location of client root
This commit is contained in:
parent
ba5a164ec8
commit
7e6114985e
1 changed files with 7 additions and 3 deletions
|
@ -125,10 +125,14 @@ CPatchManager::CPatchManager() : State("t_state"), DataScanState("t_data_scan_st
|
||||||
UpgradeBatchFilename = "upgd_nl.sh";
|
UpgradeBatchFilename = "upgd_nl.sh";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// use application directory by default
|
std::string rootPath;
|
||||||
std::string rootPath = Args.getProgramPath();
|
|
||||||
|
|
||||||
if (!CFile::fileExists(rootPath + "client_default.cfg"))
|
if (ClientCfg.getDefaultConfigLocation(rootPath))
|
||||||
|
{
|
||||||
|
// use same directory as client_default.cfg
|
||||||
|
rootPath = CFile::getPath(rootPath);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
// use current directory
|
// use current directory
|
||||||
rootPath = CPath::getCurrentPath();
|
rootPath = CPath::getCurrentPath();
|
||||||
|
|
Loading…
Reference in a new issue