mirror of https://gitee.com/bigwinds/arangodb
don't create `arangosh_XXXXXX` directories (#9809)
* don't create `arangosh_XXXXXX` directories * updated CHANGELOG
This commit is contained in:
parent
44ab3f04b5
commit
f59789e591
|
@ -1,6 +1,8 @@
|
|||
v3.5.1 (XXXX-XX-XX)
|
||||
-------------------
|
||||
|
||||
* Don't create temporary directories named "arangosh_XXXXXX" anymore.
|
||||
|
||||
* Add TransactionStatistics to ServerStatistics (transactions started /
|
||||
aborted / committed and number of intermediate commits).
|
||||
|
||||
|
|
|
@ -2237,9 +2237,16 @@ std::string TRI_GetTempPath() {
|
|||
try {
|
||||
long systemError;
|
||||
std::string systemErrorStr;
|
||||
TRI_CreateRecursiveDirectory(SystemTempPath.get(), systemError, systemErrorStr);
|
||||
std::string baseDirectory = TRI_Dirname(SystemTempPath.get());
|
||||
if (baseDirectory.size() <= 1) {
|
||||
baseDirectory = SystemTempPath.get();
|
||||
}
|
||||
// create base directory if it does not yet exist
|
||||
TRI_CreateRecursiveDirectory(baseDirectory.data(), systemError, systemErrorStr);
|
||||
} catch (...) {}
|
||||
|
||||
// fill template string (XXXXXX) with some pseudo-random value and create
|
||||
// the directory
|
||||
res = mkDTemp(SystemTempPath.get(), system.size() + 1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue