diff src/os/unix/ngx_files.c @ 456:ca8f7f6cab16 NGINX_0_7_40

nginx 0.7.40 *) Feature: the "location" directive supports captures in regular expressions. *) Feature: an "alias" directive with capture references may be used inside a location given by a regular expression with captures. *) Feature: the "server_name" directive supports captures in regular expressions. *) Workaround: the ngx_http_autoindex_module did not show the trailing slash in directories on XFS filesystem; the issue had appeared in 0.7.15. Thanks to Dmitry Kuzmenko.
author Igor Sysoev <http://sysoev.ru>
date Mon, 09 Mar 2009 00:00:00 +0300
parents a8e3f1441eec
children 56baf312c1b5
line wrap: on
line diff
--- a/src/os/unix/ngx_files.c
+++ b/src/os/unix/ngx_files.c
@@ -249,11 +249,6 @@ ngx_open_dir(ngx_str_t *name, ngx_dir_t 
     }
 
     dir->valid_info = 0;
-#if (NGX_HAVE_D_TYPE)
-    dir->valid_type = 1;
-#else
-    dir->valid_type = 0;
-#endif
 
     return NGX_OK;
 }
@@ -267,6 +262,9 @@ 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;
 #endif
         return NGX_OK;
     }