324 | 324 |
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
|
325 | 325 |
"http delete filename: \"%s\"", path.data);
|
326 | 326 |
|
327 | |
if (ngx_file_info(path.data, &fi) == NGX_FILE_ERROR) {
|
|
327 |
if (ngx_link_info(path.data, &fi) == NGX_FILE_ERROR) {
|
328 | 328 |
err = ngx_errno;
|
329 | 329 |
|
330 | 330 |
rc = (err == NGX_ENOTDIR) ? NGX_HTTP_CONFLICT : NGX_HTTP_NOT_FOUND;
|
331 | 331 |
|
332 | 332 |
return ngx_http_dav_error(r->connection->log, err,
|
333 | |
rc, ngx_file_info_n, path.data);
|
|
333 |
rc, ngx_link_info_n, path.data);
|
334 | 334 |
}
|
335 | 335 |
|
336 | 336 |
if (ngx_is_dir(&fi)) {
|
|
357 | 357 |
|
358 | 358 |
/*
|
359 | 359 |
* we do not need to test (r->uri.data[r->uri.len - 1] == '/')
|
360 | |
* because ngx_file_info("/file/") returned NGX_ENOTDIR above
|
|
360 |
* because ngx_link_info("/file/") returned NGX_ENOTDIR above
|
361 | 361 |
*/
|
362 | 362 |
|
363 | 363 |
depth = ngx_http_dav_depth(r, 0);
|
|
684 | 684 |
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
|
685 | 685 |
"http copy to: \"%s\"", copy.path.data);
|
686 | 686 |
|
687 | |
if (ngx_file_info(copy.path.data, &fi) == NGX_FILE_ERROR) {
|
|
687 |
if (ngx_link_info(copy.path.data, &fi) == NGX_FILE_ERROR) {
|
688 | 688 |
err = ngx_errno;
|
689 | 689 |
|
690 | 690 |
if (err != NGX_ENOENT) {
|
691 | 691 |
return ngx_http_dav_error(r->connection->log, err,
|
692 | |
NGX_HTTP_NOT_FOUND, ngx_file_info_n,
|
|
692 |
NGX_HTTP_NOT_FOUND, ngx_link_info_n,
|
693 | 693 |
copy.path.data);
|
694 | 694 |
}
|
695 | 695 |
|
|
718 | 718 |
dir = ngx_is_dir(&fi);
|
719 | 719 |
}
|
720 | 720 |
|
721 | |
if (ngx_file_info(path.data, &fi) == NGX_FILE_ERROR) {
|
|
721 |
if (ngx_link_info(path.data, &fi) == NGX_FILE_ERROR) {
|
722 | 722 |
return ngx_http_dav_error(r->connection->log, ngx_errno,
|
723 | |
NGX_HTTP_NOT_FOUND, ngx_file_info_n,
|
|
723 |
NGX_HTTP_NOT_FOUND, ngx_link_info_n,
|
724 | 724 |
path.data);
|
725 | 725 |
}
|
726 | 726 |
|