comparison src/os/unix/ngx_files.c @ 3433:6b8284fc958d stable-0.7

merge r3201, r3204, r3411: ngx_http_autoindex_module fixes: *) 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 *) fix ngx_utf8_cpystrn(): it did not fully copy utf-8 string
author Igor Sysoev <igor@sysoev.ru>
date Mon, 01 Feb 2010 14:52:25 +0000
parents ceef364208c8
children d65ba5392f59
comparison
equal deleted inserted replaced
3432:20871c5e1d5d 3433:6b8284fc958d
260 dir->de = readdir(dir->dir); 260 dir->de = readdir(dir->dir);
261 261
262 if (dir->de) { 262 if (dir->de) {
263 #if (NGX_HAVE_D_TYPE) 263 #if (NGX_HAVE_D_TYPE)
264 dir->type = dir->de->d_type; 264 dir->type = dir->de->d_type;
265 dir->valid_type = dir->type ? 1 : 0;
266 #else 265 #else
267 dir->valid_type = 0; 266 dir->type = 0;
268 #endif 267 #endif
269 return NGX_OK; 268 return NGX_OK;
270 } 269 }
271 270
272 return NGX_ERROR; 271 return NGX_ERROR;