Configuration: automatic migration to the new "share" behavior.

This commit is contained in:
Zhidao HONG
2021-10-09 10:44:31 +08:00
parent af283833dd
commit 5fa5b1464f
8 changed files with 180 additions and 52 deletions

View File

@@ -839,6 +839,21 @@ nxt_runtime_conf_init(nxt_task_t *task, nxt_runtime_t *rt)
slash = "/";
}
ret = nxt_file_name_create(rt->mem_pool, &file_name, "%s%sversion%Z",
rt->state, slash);
if (nxt_slow_path(ret != NXT_OK)) {
return NXT_ERROR;
}
rt->ver = (char *) file_name.start;
ret = nxt_file_name_create(rt->mem_pool, &file_name, "%s.tmp%Z", rt->ver);
if (nxt_slow_path(ret != NXT_OK)) {
return NXT_ERROR;
}
rt->ver_tmp = (char *) file_name.start;
ret = nxt_file_name_create(rt->mem_pool, &file_name, "%s%sconf.json%Z",
rt->state, slash);
if (nxt_slow_path(ret != NXT_OK)) {