[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:
parent
ad6d41896e
commit
f7410da5d2
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue