comparison src/os/unix/ngx_files.c @ 3200:26784c34e8be

*) reset cached dirent.d_type after stat() this fixes slash after link to a directory in ngx_http_autoindex_module; *) use cached dirent.d_type as hint on all systems the issues has been introduced in r2235
author Igor Sysoev <igor@sysoev.ru>
date Wed, 14 Oct 2009 11:33:35 +0000
parents b1b1775698d5
children 04cfc09b8b8d
comparison
equal deleted inserted replaced
3199:b242aaf1dcfa 3200:26784c34e8be
272 dir->de = readdir(dir->dir); 272 dir->de = readdir(dir->dir);
273 273
274 if (dir->de) { 274 if (dir->de) {
275 #if (NGX_HAVE_D_TYPE) 275 #if (NGX_HAVE_D_TYPE)
276 dir->type = dir->de->d_type; 276 dir->type = dir->de->d_type;
277 dir->valid_type = dir->type ? 1 : 0;
278 #else 277 #else
279 dir->valid_type = 0; 278 dir->type = 0;
280 #endif 279 #endif
281 return NGX_OK; 280 return NGX_OK;
282 } 281 }
283 282
284 return NGX_ERROR; 283 return NGX_ERROR;