comparison 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
comparison
equal deleted inserted replaced
3480:f4957081d935 3481:35e258519a83
760 } 760 }
761 761
762 size -= n; 762 size -= n;
763 } 763 }
764 764
765 if (ngx_set_file_time(to, nfd, cf->time) != NGX_OK) { 765 if (cf->time != -1) {
766 ngx_log_error(NGX_LOG_ALERT, cf->log, ngx_errno, 766 if (ngx_set_file_time(to, nfd, cf->time) != NGX_OK) {
767 ngx_set_file_time_n " \"%s\" failed", to); 767 ngx_log_error(NGX_LOG_ALERT, cf->log, ngx_errno,
768 goto failed; 768 ngx_set_file_time_n " \"%s\" failed", to);
769 goto failed;
770 }
769 } 771 }
770 772
771 rc = NGX_OK; 773 rc = NGX_OK;
772 774
773 failed: 775 failed: