1
0
Fork 0

don't create `arangosh_XXXXXX` directories (#9809)

* don't create `arangosh_XXXXXX` directories

* updated CHANGELOG
This commit is contained in:
Jan 2019-08-26 18:52:24 +02:00 committed by KVS85
parent 44ab3f04b5
commit f59789e591
2 changed files with 10 additions and 1 deletions

View File

@ -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).

View File

@ -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);
}