Deleted Added
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) Valentin V. Bartenev
5 * Copyright (C) NGINX, Inc.
6 */
7
8#include <nxt_main.h>

--- 825 unchanged lines hidden (view full) ---

834
835 slash = "";
836 n = nxt_strlen(rt->state);
837
838 if (n > 1 && rt->state[n - 1] != '/') {
839 slash = "/";
840 }
841
842 ret = nxt_file_name_create(rt->mem_pool, &file_name, "%s%sversion%Z",
843 rt->state, slash);
844 if (nxt_slow_path(ret != NXT_OK)) {
845 return NXT_ERROR;
846 }
847
848 rt->ver = (char *) file_name.start;
849
850 ret = nxt_file_name_create(rt->mem_pool, &file_name, "%s.tmp%Z", rt->ver);
851 if (nxt_slow_path(ret != NXT_OK)) {
852 return NXT_ERROR;
853 }
854
855 rt->ver_tmp = (char *) file_name.start;
856
857 ret = nxt_file_name_create(rt->mem_pool, &file_name, "%s%sconf.json%Z",
858 rt->state, slash);
859 if (nxt_slow_path(ret != NXT_OK)) {
860 return NXT_ERROR;
861 }
862
863 rt->conf = (char *) file_name.start;
864

--- 861 unchanged lines hidden ---