[nginx] svn commit: r4784 - trunk/src/core
ru at nginx.com
ru at nginx.com
Fri Aug 3 12:52:32 UTC 2012
Author: ru
Date: 2012-08-03 12:52:32 +0000 (Fri, 03 Aug 2012)
New Revision: 4784
URL: http://trac.nginx.org/nginx/changeset/4784/nginx
Log:
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 `/'.
Modified:
trunk/src/core/nginx.c
Modified: trunk/src/core/nginx.c
===================================================================
--- trunk/src/core/nginx.c 2012-08-03 09:10:39 UTC (rev 4783)
+++ trunk/src/core/nginx.c 2012-08-03 12:52:32 UTC (rev 4784)
@@ -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;
More information about the nginx-devel
mailing list