mirror of https://gitee.com/bigwinds/arangodb
initialize path after drop privileges
Conflicts: arangod/RestServer/ArangoServer.cpp
This commit is contained in:
parent
d1d4daefb8
commit
8697e2758d
|
@ -300,11 +300,6 @@ ArangoServer::ArangoServer (int argc, char** argv)
|
|||
|
||||
TRI_SetApplicationName("arangod");
|
||||
|
||||
char* p = TRI_GetTempPath();
|
||||
// copy the string
|
||||
_tempPath = string(p);
|
||||
TRI_FreeString(TRI_CORE_MEM_ZONE, p);
|
||||
|
||||
// set working directory and database directory
|
||||
#ifdef _WIN32
|
||||
_workingDirectory = ".";
|
||||
|
@ -623,6 +618,11 @@ void ArangoServer::buildApplicationServer () {
|
|||
TRI_SetUserTempPath((char*) _tempPath.c_str());
|
||||
}
|
||||
|
||||
// must be used after drop privileges and be called to set it to avoid raise conditions
|
||||
char* pp = TRI_GetTempPath();
|
||||
TRI_FreeString(TRI_CORE_MEM_ZONE, pp);
|
||||
|
||||
|
||||
IGNORE_DATAFILE_ERRORS = _ignoreDatafileErrors;
|
||||
|
||||
// .............................................................................
|
||||
|
|
Loading…
Reference in New Issue