MCPcopy Index your code
hub / github.com/apache/httpd / file_cache_el_final

Function file_cache_el_final

modules/cache/mod_cache_disk.c:161–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159}
160
161static apr_status_t file_cache_el_final(disk_cache_conf *conf, disk_cache_file_t *file,
162 request_rec *r)
163{
164 apr_status_t rv = APR_SUCCESS;
165
166 /* This assumes that the tempfiles are on the same file system
167 * as the cache_root. If not, then we need a file copy/move
168 * rather than a rename.
169 */
170
171 /* move the file over */
172 if (file->tempfd) {
173
174 rv = safe_file_rename(conf, file->tempfile, file->file, file->pool);
175 if (rv != APR_SUCCESS) {
176 ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, r, APLOGNO(00699)
177 "rename tempfile to file failed:"
178 " %s -> %s", file->tempfile, file->file);
179 apr_file_remove(file->tempfile, file->pool);
180 }
181
182 file->tempfd = NULL;
183 }
184
185 return rv;
186}
187
188static apr_status_t file_cache_temp_cleanup(void *dummy)
189{

Callers 1

commit_entityFunction · 0.85

Calls 1

safe_file_renameFunction · 0.85

Tested by

no test coverage detected