# HG changeset patch # User Maxim Dounin # Date 1348512625 0 # Node ID 6173853dd7827c10184e333b14e4ecc309fb0dec # Parent e74c39b69ebeabe057eb2f16f29301c20a71fbb8 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 `/'. diff -r e74c39b69ebe -r 6173853dd782 src/core/nginx.c --- 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;