Mercurial > hg > nginx
comparison src/http/modules/ngx_http_dav_module.c @ 1803:7405719e4848
condition declarations inside blocks update missed in r1705
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sat, 29 Dec 2007 13:55:10 +0000 |
parents | a35bc4007ec3 |
children | d457a1576532 |
comparison
equal
deleted
inserted
replaced
1802:7c832e132dbc | 1803:7405719e4848 |
---|---|
797 ngx_http_dav_copy_dir_time(ngx_tree_ctx_t *ctx, ngx_str_t *path) | 797 ngx_http_dav_copy_dir_time(ngx_tree_ctx_t *ctx, ngx_str_t *path) |
798 { | 798 { |
799 u_char *p, *dir; | 799 u_char *p, *dir; |
800 size_t len; | 800 size_t len; |
801 ngx_http_dav_copy_ctx_t *copy; | 801 ngx_http_dav_copy_ctx_t *copy; |
802 #if (WIN32) | |
803 ngx_fd_t fd; | |
804 #endif | |
805 | 802 |
806 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, ctx->log, 0, | 803 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, ctx->log, 0, |
807 "http copy dir time: \"%s\"", path->data); | 804 "http copy dir time: \"%s\"", path->data); |
808 | 805 |
809 copy = ctx->data; | 806 copy = ctx->data; |
819 (void) ngx_cpystrn(p, path->data + copy->len, path->len - copy->len + 1); | 816 (void) ngx_cpystrn(p, path->data + copy->len, path->len - copy->len + 1); |
820 | 817 |
821 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, ctx->log, 0, | 818 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, ctx->log, 0, |
822 "http copy dir time to: \"%s\"", dir); | 819 "http copy dir time to: \"%s\"", dir); |
823 | 820 |
824 #if (WIN32) | 821 #if (NGX_WIN32) |
822 { | |
823 ngx_fd_t fd; | |
825 | 824 |
826 fd = ngx_open_file(dir, NGX_FILE_RDWR, NGX_FILE_OPEN, 0); | 825 fd = ngx_open_file(dir, NGX_FILE_RDWR, NGX_FILE_OPEN, 0); |
827 | 826 |
828 if (fd == NGX_INVALID_FILE) { | 827 if (fd == NGX_INVALID_FILE) { |
829 (void) ngx_http_dav_error(ctx->log, ngx_errno, 0, ngx_open_file_n, dir); | 828 (void) ngx_http_dav_error(ctx->log, ngx_errno, 0, ngx_open_file_n, dir); |
836 } | 835 } |
837 | 836 |
838 if (ngx_close_file(fd) == NGX_FILE_ERROR) { | 837 if (ngx_close_file(fd) == NGX_FILE_ERROR) { |
839 ngx_log_error(NGX_LOG_ALERT, ctx->log, ngx_errno, | 838 ngx_log_error(NGX_LOG_ALERT, ctx->log, ngx_errno, |
840 ngx_close_file_n " \"%s\" failed", dir); | 839 ngx_close_file_n " \"%s\" failed", dir); |
840 } | |
841 } | 841 } |
842 | 842 |
843 failed: | 843 failed: |
844 | 844 |
845 #else | 845 #else |