From: Ruslan Ermilov Date: Fri, 3 Aug 2012 12:52:32 +0000 (+0000) Subject: Fixed the -p parameter handling. X-Git-Tag: release-1.3.5~17 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=8ed4929a261f64c28c21e42f0f366c8d228fc790;p=nginx.git 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 `/'. --- diff --git a/src/core/nginx.c b/src/core/nginx.c index f21e77d30..c7f84fd67 100644 --- a/src/core/nginx.c +++ b/src/core/nginx.c @@ -836,7 +836,7 @@ ngx_process_options(ngx_cycle_t *cycle) 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;