Mercurial > hg > nginx-vendor-current
diff src/core/ngx_file.c @ 536:0dc162a5f3e8 NGINX_0_8_20
nginx 0.8.20
*) Change: now default SSL ciphers are "HIGH:!ADH:!MD5".
*) Bugfix: the ngx_http_autoindex_module did not show the trailing
slash in links to a directory; the bug had appeared in 0.7.15.
*) Bugfix: nginx did not close a log file set by the --error-log-path
configuration option; the bug had appeared in 0.7.53.
*) Bugfix: nginx did not treat a comma as separator in the
"Cache-Control" backend response header line.
*) Bugfix: nginx/Windows might not create temporary file, a cache file,
or "proxy/fastcgi_store"d file if a worker has no enough access
rights for top level directories.
*) Bugfix: the "Set-Cookie" and "P3P" FastCGI response header lines
were not hidden while caching if no "fastcgi_hide_header" directives
were used with any parameters.
*) Bugfix: nginx counted incorrectly disk cache size.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 14 Oct 2009 00:00:00 +0400 |
parents | 7efcdb937752 |
children | 25255878df91 |
line wrap: on
line diff
--- a/src/core/ngx_file.c +++ b/src/core/ngx_file.c @@ -183,7 +183,15 @@ ngx_create_full_path(u_char *dir, ngx_ui u_char *p, ch; ngx_err_t err; - for (p = dir + 1; *p; p++) { + err = 0; + +#if (NGX_WIN32) + p = dir + 3; +#else + p = dir + 1; +#endif + + for ( /* void */ ; *p; p++) { ch = *p; if (ch != '/') { @@ -194,7 +202,14 @@ ngx_create_full_path(u_char *dir, ngx_ui if (ngx_create_dir(dir, access) == NGX_FILE_ERROR) { err = ngx_errno; - if (err != NGX_EEXIST) { + + switch (err) { + case NGX_EEXIST: + err = 0; + case NGX_EACCES: + break; + + default: return err; } } @@ -202,7 +217,7 @@ ngx_create_full_path(u_char *dir, ngx_ui *p = '/'; } - return 0; + return err; }