diff options
author | Igor Sysoev <igor@sysoev.ru> | 2006-08-30 10:39:17 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2006-08-30 10:39:17 +0000 |
commit | da173abde0afa26b02c778d6475462ed487594c5 (patch) | |
tree | 25362ec56c889a2284e6feb341d5b87f13b5beab /src/os/win32/ngx_files.c | |
parent | 9cdd8a1cbcf70527db51eeab707a5bc05babdcf3 (diff) | |
download | nginx-da173abde0afa26b02c778d6475462ed487594c5.tar.gz nginx-da173abde0afa26b02c778d6475462ed487594c5.zip |
nginx-0.4.0-RELEASE importrelease-0.4.0
*) Change in internal API: the HTTP modules initialization was moved
from the init module phase to the HTTP postconfiguration phase.
*) Change: now the request body is not read beforehand for the
ngx_http_perl_module: it's required to start the reading using the
$r->has_request_body method.
*) Feature: the ngx_http_perl_module supports the DECLINED return code.
*) Feature: the ngx_http_dav_module supports the incoming "Date" header
line for the PUT method.
*) Feature: the "ssi" directive is available inside the "if" block.
*) Bugfix: a segmentation fault occurred if there was an "index"
directive with variables and the first index name was without
variables; the bug had appeared in 0.1.29.
Diffstat (limited to 'src/os/win32/ngx_files.c')
-rw-r--r-- | src/os/win32/ngx_files.c | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/src/os/win32/ngx_files.c b/src/os/win32/ngx_files.c index dcffca7ea..aee87043b 100644 --- a/src/os/win32/ngx_files.c +++ b/src/os/win32/ngx_files.c @@ -261,6 +261,27 @@ ngx_file_info(char *file, ngx_file_info_t *sb) ngx_int_t +ngx_set_file_time(u_char *name, ngx_fd_t fd, time_t s) +{ + uint64_t intervals; + FILETIME ft; + + /* 116444736000000000 is commented in src/os/win32/ngx_time.c */ + + intervals = s * 10000000 + 116444736000000000; + + ft.dwLowDateTime = (DWORD) intervals; + ft.dwHighDateTime = (DWORD) (intervals >> 32); + + if (SetFileTime(fd, NULL, NULL, &ft) != 0) { + return NGX_OK; + } + + return NGX_ERROR; +} + + +ngx_int_t ngx_file_info(u_char *file, ngx_file_info_t *sb) { /* Win95 */ @@ -301,11 +322,11 @@ ngx_read_dir(ngx_dir_t *dir) return NGX_OK; } - if (FindNextFile(dir->dir, &dir->fd) == 0) { - return NGX_ERROR; + if (FindNextFile(dir->dir, &dir->fd) != 0) { + return NGX_OK; } - return NGX_OK; + return NGX_ERROR; } |