mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-27 09:16:18 +00:00
Changed: Check for alternative directories
This commit is contained in:
parent
7e6f04c343
commit
728eecc08b
3 changed files with 8 additions and 12 deletions
|
@ -2210,7 +2210,7 @@ bool CClientConfig::getDefaultConfigLocation(std::string& p_name) const
|
||||||
defaultConfigPath = CPath::standardizePath(getAppBundlePath() + "/Contents/Resources/");
|
defaultConfigPath = CPath::standardizePath(getAppBundlePath() + "/Contents/Resources/");
|
||||||
#elif defined(NL_OS_UNIX)
|
#elif defined(NL_OS_UNIX)
|
||||||
// if RYZOM_ETC_PREFIX is defined, client_default.cfg might be over there
|
// if RYZOM_ETC_PREFIX is defined, client_default.cfg might be over there
|
||||||
if (!getRyzomEtcPrefix().empty()) defaultConfigPath = CPath::standardizePath(getRyzomEtcPrefix());
|
defaultConfigPath = CPath::standardizePath(getRyzomEtcPrefix());
|
||||||
#else
|
#else
|
||||||
// some other prefix here :)
|
// some other prefix here :)
|
||||||
#endif // NL_OS_UNIX
|
#endif // NL_OS_UNIX
|
||||||
|
|
|
@ -675,7 +675,7 @@ void addSearchPaths(IProgressCallback &progress)
|
||||||
#ifdef NL_OS_MAC
|
#ifdef NL_OS_MAC
|
||||||
defaultDirectory = CPath::standardizePath(getAppBundlePath() + "/Contents/Resources");
|
defaultDirectory = CPath::standardizePath(getAppBundlePath() + "/Contents/Resources");
|
||||||
#elif defined(NL_OS_UNIX)
|
#elif defined(NL_OS_UNIX)
|
||||||
if (!getRyzomSharePrefix().empty()) defaultDirectory = CPath::standardizePath(getRyzomSharePrefix());
|
if (CFile::isDirectory(getRyzomSharePrefix()) defaultDirectory = CPath::standardizePath(getRyzomSharePrefix());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// add in last position, a specific possibly read only directory
|
// add in last position, a specific possibly read only directory
|
||||||
|
@ -720,7 +720,7 @@ void addPreDataPaths(NLMISC::IProgressCallback &progress)
|
||||||
#ifdef NL_OS_MAC
|
#ifdef NL_OS_MAC
|
||||||
defaultDirectory = CPath::standardizePath(getAppBundlePath() + "/Contents/Resources");
|
defaultDirectory = CPath::standardizePath(getAppBundlePath() + "/Contents/Resources");
|
||||||
#elif defined(NL_OS_UNIX)
|
#elif defined(NL_OS_UNIX)
|
||||||
if (!getRyzomSharePrefix().empty()) defaultDirectory = CPath::standardizePath(getRyzomSharePrefix());
|
if (CFile::isDirectory(getRyzomSharePrefix()) defaultDirectory = CPath::standardizePath(getRyzomSharePrefix());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// add in last position, a specific possibly read only directory
|
// add in last position, a specific possibly read only directory
|
||||||
|
|
|
@ -220,17 +220,13 @@ void CPatchManager::setClientRootPath(const std::string& clientRootPath)
|
||||||
#ifdef NL_OS_MAC
|
#ifdef NL_OS_MAC
|
||||||
ReadableClientDataPath = CPath::standardizePath(getAppBundlePath() + "/Contents/Resources/data");
|
ReadableClientDataPath = CPath::standardizePath(getAppBundlePath() + "/Contents/Resources/data");
|
||||||
#elif defined(NL_OS_UNIX)
|
#elif defined(NL_OS_UNIX)
|
||||||
if (!getRyzomSharePrefix().empty())
|
|
||||||
{
|
|
||||||
ReadableClientDataPath = CPath::standardizePath(getRyzomSharePrefix() + "/data");
|
ReadableClientDataPath = CPath::standardizePath(getRyzomSharePrefix() + "/data");
|
||||||
}
|
if (CFile::isDirectory(ReadableClientDataPath)) ReadableClientDataPath.clear()
|
||||||
else
|
|
||||||
{
|
|
||||||
ReadableClientDataPath = WritableClientDataPath;
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
ReadableClientDataPath = WritableClientDataPath;
|
ReadableClientDataPath.clear();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (ReadableClientDataPath.empty()) ReadableClientDataPath = WritableClientDataPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ****************************************************************************
|
// ****************************************************************************
|
||||||
|
|
Loading…
Reference in a new issue