commit | a13b3b97eafbbe7fa6586e4f73b8c80ee478244c | [log] [tgz] |
---|---|---|
author | Igor Sysoev <igor@sysoev.ru> | Tue Apr 29 09:28:42 2008 +0000 |
committer | Igor Sysoev <igor@sysoev.ru> | Tue Apr 29 09:28:42 2008 +0000 |
tree | 3bf8bd774d810a450edfcefe2c5ab7fc68010e40 | |
parent | 8443360bac77bfbc123cc40943a8f851b5a5edd6 [diff] [blame] |
ignore glob no match error
diff --git a/src/os/unix/ngx_files.c b/src/os/unix/ngx_files.c index a091b9b..7ee8cbd 100644 --- a/src/os/unix/ngx_files.c +++ b/src/os/unix/ngx_files.c
@@ -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; }