Mercurial > hg > nginx
diff src/os/unix/ngx_files.c @ 1980:b5263e401884
ignore glob no match error
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 29 Apr 2008 09:28:42 +0000 |
parents | bb139aba3199 |
children | 25add486e7aa |
line wrap: on
line diff
--- a/src/os/unix/ngx_files.c Tue Apr 29 09:27:55 2008 +0000 +++ b/src/os/unix/ngx_files.c Tue Apr 29 09:28:42 2008 +0000 @@ -257,7 +257,15 @@ ngx_int_t ngx_open_glob(ngx_glob_t *gl) { - if (glob((char *) gl->pattern, GLOB_NOSORT, NULL, &gl->pglob) == 0) { + int n; + + n = glob((char *) gl->pattern, GLOB_NOSORT, NULL, &gl->pglob); + + if (n == 0) { + return NGX_OK; + } + + if (n == GLOB_NOMATCH && gl->test) { return NGX_OK; }