diff options
| author | Maxim Dounin <mdounin@mdounin.ru> | 2012-09-24 18:50:25 +0000 |
|---|---|---|
| committer | Maxim Dounin <mdounin@mdounin.ru> | 2012-09-24 18:50:25 +0000 |
| commit | f8c0690d379ad745fe3a7e7f53548964278ce094 (patch) | |
| tree | f5862c2b076aafee7ca3aaa8cd4c0fd3f6b1da4b /src/core/nginx.c | |
| parent | 90c3d53146acb56a8fc72ddf2078bdb030dd06b9 (diff) | |
| download | nginx-f8c0690d379ad745fe3a7e7f53548964278ce094.tar.gz nginx-f8c0690d379ad745fe3a7e7f53548964278ce094.tar.bz2 | |
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 `/'.
Diffstat (limited to 'src/core/nginx.c')
| -rw-r--r-- | src/core/nginx.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |
