From af7e5336829540d80490fc4fa7153ce2efb95954 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Mon, 1 Feb 2010 14:52:25 +0000 Subject: 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 --- src/os/unix/ngx_files.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/os/unix/ngx_files.c') diff --git a/src/os/unix/ngx_files.c b/src/os/unix/ngx_files.c index 98ed08229..10436a918 100644 --- a/src/os/unix/ngx_files.c +++ b/src/os/unix/ngx_files.c @@ -262,9 +262,8 @@ ngx_read_dir(ngx_dir_t *dir) if (dir->de) { #if (NGX_HAVE_D_TYPE) dir->type = dir->de->d_type; - dir->valid_type = dir->type ? 1 : 0; #else - dir->valid_type = 0; + dir->type = 0; #endif return NGX_OK; } -- cgit