Mercurial > hg > nginx
changeset 2462:90d5ddfedbb1
use GetFileAttributesEx() instead of GetFileAttributes()
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 21 Jan 2009 15:56:29 +0000 |
parents | 2d3026ea9a65 |
children | 4bc8ea10d62b |
files | src/os/win32/ngx_files.c |
diffstat | 1 files changed, 2 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/src/os/win32/ngx_files.c Wed Jan 21 15:53:09 2009 +0000 +++ b/src/os/win32/ngx_files.c Wed Jan 21 15:56:29 2009 +0000 @@ -256,16 +256,14 @@ } -#if 0 - ngx_int_t -ngx_file_info(char *file, ngx_file_info_t *sb) +ngx_file_info(u_char *file, ngx_file_info_t *sb) { WIN32_FILE_ATTRIBUTE_DATA fa; /* NT4 and Win98 */ - if (GetFileAttributesEx(file, GetFileExInfoStandard, &fa) == 0) { + if (GetFileAttributesEx((char *) file, GetFileExInfoStandard, &fa) == 0) { return NGX_ERROR; } @@ -279,8 +277,6 @@ return NGX_OK; } -#endif - ngx_int_t ngx_set_file_time(u_char *name, ngx_fd_t fd, time_t s) @@ -303,21 +299,6 @@ } -ngx_int_t -ngx_file_info(u_char *file, ngx_file_info_t *sb) -{ - /* Win95 */ - - sb->dwFileAttributes = GetFileAttributes((const char *) file); - - if (sb->dwFileAttributes == INVALID_FILE_ATTRIBUTES) { - return NGX_ERROR; - } - - return NGX_OK; -} - - char * ngx_realpath(u_char *path, u_char *resolved) {