Ticket #1027: lighttpd-1.4.19-compress-mkdir.patch
| File lighttpd-1.4.19-compress-mkdir.patch, 1.1 kB (added by spillgroup, 5 months ago) |
|---|
-
lighttpd-1.4.19/src/mod_compress.c
old new 411 411 412 412 buffer_append_string_buffer(p->ofn, sce->etag); 413 413 414 if (-1 == mkdir_for_file(p->ofn->ptr)) {415 log_error_write(srv, __FILE__, __LINE__, "sb", "couldn't create directory for file", p->ofn);416 return -1;417 }418 419 414 if (-1 == (ofd = open(p->ofn->ptr, O_WRONLY | O_CREAT | O_EXCL | O_BINARY, 0600))) { 420 415 if (errno == EEXIST) { 421 416 /* cache-entry exists */ … … 427 422 return 0; 428 423 } 429 424 430 log_error_write(srv, __FILE__, __LINE__, "sbss", "creating cachefile", p->ofn, "failed", strerror(errno)); 425 if (-1 == mkdir_for_file(p->ofn->ptr)) { 426 log_error_write(srv, __FILE__, __LINE__, "sb", "couldn't create directory for file", p->ofn); 427 return -1; 428 } 431 429 432 return -1; 430 if (-1 == (ofd = open(p->ofn->ptr, O_WRONLY | O_CREAT | O_EXCL | O_BINARY, 0600))) { 431 log_error_write(srv, __FILE__, __LINE__, "sbss", "creating cachefile", p->ofn, "failed", strerror(errno)); 432 return -1; 433 } 433 434 } 434 435 #if 0 435 436 log_error_write(srv, __FILE__, __LINE__, "bs", p->ofn, "compress-cache miss");

