From 01c2dd9f3306bc26d9fa6bef2f79e62d96dd997d Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 15 Mar 2016 17:45:55 +0100 Subject: [PATCH] Merge with develop --- code/ryzom/client/src/client_cfg.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/code/ryzom/client/src/client_cfg.cpp b/code/ryzom/client/src/client_cfg.cpp index 229b1440b..38e48cb21 100644 --- a/code/ryzom/client/src/client_cfg.cpp +++ b/code/ryzom/client/src/client_cfg.cpp @@ -2213,6 +2213,7 @@ bool CClientConfig::getDefaultConfigLocation(std::string& p_name) const #endif std::string currentPath = CPath::standardizePath(CPath::getCurrentPath()); + std::string etcPath = CPath::standardizePath(getRyzomEtcPrefix()); // look in the current working directory first if (CFile::isExists(currentPath + defaultConfigFileName)) @@ -2222,13 +2223,14 @@ bool CClientConfig::getDefaultConfigLocation(std::string& p_name) const else if (CFile::isExists(Args.getStartupPath() + defaultConfigFileName)) p_name = Args.getStartupPath() + defaultConfigFileName; - // look in prefix path + // look in application directory else if (CFile::isExists(defaultConfigPath + defaultConfigFileName)) p_name = defaultConfigPath + defaultConfigFileName; - // if some client_default.cfg was found return true - if (p_name.size()) - return true; + // look in etc prefix path + else if (!etcPath.empty() && CFile::isExists(etcPath + defaultConfigFileName)) + p_name = etcPath + defaultConfigFileName; - return false; + // if some client_default.cfg was found return true + return !p_name.empty(); }