From 3c1a41d2b39a5444ed8748429ab1c752163bff25 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 20 Feb 2016 19:07:34 +0100 Subject: [PATCH] Changed: Use ClientCfg.getDefaultConfigLocation to get location of client root --HG-- branch : develop --- code/ryzom/client/src/login_patch.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index 192487905..0ba2f472c 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -125,10 +125,14 @@ CPatchManager::CPatchManager() : State("t_state"), DataScanState("t_data_scan_st UpgradeBatchFilename = "upgd_nl.sh"; #endif - // use application directory by default - std::string rootPath = Args.getProgramPath(); + std::string rootPath; - 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 rootPath = CPath::getCurrentPath();