Mercurial > hg > nginx
changeset 4851:6173853dd782 stable-1.2
Merge of r4784: 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 `/'.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 24 Sep 2012 18:50:25 +0000 |
parents | e74c39b69ebe |
children | 9be0b6b749ae |
files | src/core/nginx.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/core/nginx.c Mon Sep 24 18:46:50 2012 +0000 +++ b/src/core/nginx.c Mon Sep 24 18:50:25 2012 +0000 @@ -836,7 +836,7 @@ len = ngx_strlen(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); if (p == NULL) { return NGX_ERROR;