mirror of https://gitee.com/bigwinds/arangodb
fix calculation of etc directory for windows install.
This commit is contained in:
parent
68c57ce061
commit
b2b263f212
|
@ -305,8 +305,14 @@ else()
|
|||
set(ETCDIR_INSTALL "${ETCDIR}/arangodb")
|
||||
endif ()
|
||||
|
||||
file(TO_NATIVE_PATH "${ETCDIR_NATIVE}" ETCDIR_NATIVE)
|
||||
STRING(REGEX REPLACE "\\\\" "\\\\\\\\" ETCDIR_ESCAPED "${ETCDIR_NATIVE}")
|
||||
|
||||
if (MSVC)
|
||||
file(TO_NATIVE_PATH "${ETCDIR_INSTALL}" ETCDIR_INSTALL)
|
||||
STRING(REGEX REPLACE "\\\\" "\\\\\\\\" ETCDIR_ESCAPED "${ETCDIR_INSTALL}")
|
||||
else ()
|
||||
file(TO_NATIVE_PATH "${ETCDIR_NATIVE}" ETCDIR_NATIVE)
|
||||
STRING(REGEX REPLACE "\\\\" "\\\\\\\\" ETCDIR_ESCAPED "${ETCDIR_NATIVE}")
|
||||
endif()
|
||||
|
||||
add_definitions("-D_SYSCONFDIR_=\"${ETCDIR_ESCAPED}\"")
|
||||
|
||||
|
|
|
@ -959,7 +959,14 @@ bool ApplicationServer::readConfigurationFile () {
|
|||
char* d = TRI_LocateConfigDirectory();
|
||||
|
||||
if (d != 0) {
|
||||
string sysDir = string(d) + _systemConfigFile;
|
||||
string sysDir = string(d);
|
||||
|
||||
if ((sysDir.length() > 0) &&
|
||||
(sysDir[sysDir.length() - 1] != TRI_DIR_SEPARATOR_CHAR)) {
|
||||
sysDir += TRI_DIR_SEPARATOR_CHAR;
|
||||
}
|
||||
sysDir += _systemConfigFile;
|
||||
|
||||
string localSysDir = sysDir + ".local";
|
||||
|
||||
TRI_FreeString(TRI_CORE_MEM_ZONE, d);
|
||||
|
|
Loading…
Reference in New Issue