fix r1981 on win32

This commit is contained in:
Igor Sysoev 2009-01-21 14:17:57 +00:00
parent 319dc27e8a
commit 1cf4988be6

View File

@ -366,12 +366,17 @@ ngx_open_glob(ngx_glob_t *gl)
{
u_char *p;
size_t len;
ngx_err_t err;
gl->dir = FindFirstFile((const char *) gl->pattern, &gl->finddata);
if (gl->dir == INVALID_HANDLE_VALUE) {
if (ngx_errno == ERROR_FILE_NOT_FOUND && gl->test) {
err = ngx_errno;
if ((err == ERROR_FILE_NOT_FOUND || err == ERROR_PATH_NOT_FOUND)
&& gl->test)
{
gl->no_match = 1;
return NGX_OK;
}