mirror of
https://github.com/nginx/nginx.git
synced 2024-12-12 02:09:04 +08:00
Fixed the -p parameter handling.
Ensure that the path supplied always ends with a `/' except when empty. An empty value now corresponds to the current directory instead of `/'.
This commit is contained in:
parent
25197b3229
commit
8ed4929a26
@ -836,7 +836,7 @@ ngx_process_options(ngx_cycle_t *cycle)
|
|||||||
len = ngx_strlen(ngx_prefix);
|
len = ngx_strlen(ngx_prefix);
|
||||||
p = ngx_prefix;
|
p = ngx_prefix;
|
||||||
|
|
||||||
if (!ngx_path_separator(*p)) {
|
if (len && !ngx_path_separator(p[len - 1])) {
|
||||||
p = ngx_pnalloc(cycle->pool, len + 1);
|
p = ngx_pnalloc(cycle->pool, len + 1);
|
||||||
if (p == NULL) {
|
if (p == NULL) {
|
||||||
return NGX_ERROR;
|
return NGX_ERROR;
|
||||||
|
Loading…
Reference in New Issue
Block a user