Mercurial > hg > nginx-quic
diff src/core/ngx_file.c @ 3481:35e258519a83
do not set file time in ngx_copy_file() if the time is -1,
this fixes an issue when file is moved across devices
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 30 Mar 2010 14:15:25 +0000 |
parents | a02b6d2e3bfd |
children | dd1570b6f237 |
line wrap: on
line diff
--- a/src/core/ngx_file.c +++ b/src/core/ngx_file.c @@ -762,10 +762,12 @@ ngx_copy_file(u_char *from, u_char *to, size -= n; } - if (ngx_set_file_time(to, nfd, cf->time) != NGX_OK) { - ngx_log_error(NGX_LOG_ALERT, cf->log, ngx_errno, - ngx_set_file_time_n " \"%s\" failed", to); - goto failed; + if (cf->time != -1) { + if (ngx_set_file_time(to, nfd, cf->time) != NGX_OK) { + ngx_log_error(NGX_LOG_ALERT, cf->log, ngx_errno, + ngx_set_file_time_n " \"%s\" failed", to); + goto failed; + } } rc = NGX_OK;