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)
|
v3.5.1 (XXXX-XX-XX)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
|
* Don't create temporary directories named "arangosh_XXXXXX" anymore.
|
||||||
|
|
||||||
* Add TransactionStatistics to ServerStatistics (transactions started /
|
* Add TransactionStatistics to ServerStatistics (transactions started /
|
||||||
aborted / committed and number of intermediate commits).
|
aborted / committed and number of intermediate commits).
|
||||||
|
|
||||||
|
|
|
@ -2237,9 +2237,16 @@ std::string TRI_GetTempPath() {
|
||||||
try {
|
try {
|
||||||
long systemError;
|
long systemError;
|
||||||
std::string systemErrorStr;
|
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 (...) {}
|
} catch (...) {}
|
||||||
|
|
||||||
|
// fill template string (XXXXXX) with some pseudo-random value and create
|
||||||
|
// the directory
|
||||||
res = mkDTemp(SystemTempPath.get(), system.size() + 1);
|
res = mkDTemp(SystemTempPath.get(), system.size() + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue