comparison src/os/unix/ngx_files.c @ 681:7e24168b0853 release-0.4.0

nginx-0.4.0-RELEASE import *) Change in internal API: the HTTP modules initialization was moved from the init module phase to the HTTP postconfiguration phase. *) Change: now the request body is not read beforehand for the ngx_http_perl_module: it's required to start the reading using the $r->has_request_body method. *) Feature: the ngx_http_perl_module supports the DECLINED return code. *) Feature: the ngx_http_dav_module supports the incoming "Date" header line for the PUT method. *) Feature: the "ssi" directive is available inside the "if" block. *) Bugfix: a segmentation fault occurred if there was an "index" directive with variables and the first index name was without variables; the bug had appeared in 0.1.29.
author Igor Sysoev <igor@sysoev.ru>
date Wed, 30 Aug 2006 10:39:17 +0000
parents f971949ffb58
children 532d15ddbe68
comparison
equal deleted inserted replaced
680:63a949f7ed4f 681:7e24168b0853
219 return n; 219 return n;
220 } 220 }
221 221
222 222
223 ngx_int_t 223 ngx_int_t
224 ngx_set_file_time(u_char *name, ngx_fd_t fd, time_t s)
225 {
226 struct timeval tv[2];
227
228 tv[0].tv_sec = s;
229 tv[0].tv_usec = 0;
230 tv[1].tv_sec = s;
231 tv[1].tv_usec = 0;
232
233 if (utimes((char *) name, tv) != -1) {
234 return NGX_OK;
235 }
236
237 return NGX_ERROR;
238 }
239
240
241 ngx_int_t
224 ngx_open_dir(ngx_str_t *name, ngx_dir_t *dir) 242 ngx_open_dir(ngx_str_t *name, ngx_dir_t *dir)
225 { 243 {
226 dir->dir = opendir((const char *) name->data); 244 dir->dir = opendir((const char *) name->data);
227 245
228 if (dir->dir == NULL) { 246 if (dir->dir == NULL) {