[core] set chunkqueue tempdirs at startup /var/tmp

If server.upload-dirs is not configured, then attempt to use TMPDIR
from the environment, if set, or else use /var/tmp which is not often
a tmpfs, unlike /tmp.  Warn at startup if tempdirs are not present.
This commit is contained in:
Glenn Strauss 2016-07-29 15:01:46 -04:00
parent ad6d41896e
commit f7410da5d2
1 changed files with 1 additions and 1 deletions

View File

@ -1366,7 +1366,7 @@ int config_set_defaults(server *srv) {
if (!srv->srvconf.upload_tempdirs->used) {
data_string *ds = data_string_init();
const char *tmpdir = getenv("TMPDIR");
if (NULL == tmpdir) tmpdir = "/tmp";
if (NULL == tmpdir) tmpdir = "/var/tmp";
buffer_copy_string(ds->value, tmpdir);
array_insert_unique(srv->srvconf.upload_tempdirs, (data_unset *)ds);
}