Mercurial > hg > nginx-quic
comparison src/os/unix/ngx_files.c @ 3861:cf80c0b0109a
set current atime while setting mtime
patch by Andrei Nigmatulin
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 11 Feb 2011 08:02:35 +0000 |
parents | fbd7dad43a4e |
children | 4be8dd8dd547 d1d34de1a419 |
comparison
equal
deleted
inserted
replaced
3860:39ad979cd31e | 3861:cf80c0b0109a |
---|---|
243 ngx_int_t | 243 ngx_int_t |
244 ngx_set_file_time(u_char *name, ngx_fd_t fd, time_t s) | 244 ngx_set_file_time(u_char *name, ngx_fd_t fd, time_t s) |
245 { | 245 { |
246 struct timeval tv[2]; | 246 struct timeval tv[2]; |
247 | 247 |
248 tv[0].tv_sec = s; | 248 tv[0].tv_sec = ngx_time(); |
249 tv[0].tv_usec = 0; | 249 tv[0].tv_usec = 0; |
250 tv[1].tv_sec = s; | 250 tv[1].tv_sec = s; |
251 tv[1].tv_usec = 0; | 251 tv[1].tv_usec = 0; |
252 | 252 |
253 if (utimes((char *) name, tv) != -1) { | 253 if (utimes((char *) name, tv) != -1) { |