| 413 | was skipped. */ |
| 414 | |
| 415 | static enum copy_status |
| 416 | copy_file (char const *from, char const *to, |
| 417 | int to_dirfd, char const *to_relname, const struct cp_options *x) |
| 418 | { |
| 419 | if (copy_only_if_needed && !need_copy (from, to, to_dirfd, to_relname, x)) |
| 420 | return COPY_SKIPPED; |
| 421 | |
| 422 | /* Allow installing from non-regular files like /dev/null. |
| 423 | Charles Karney reported that some Sun version of install allows that |
| 424 | and that sendmail's installation process relies on the behavior. |
| 425 | However, since !x->recursive, the call to "copy" will fail if FROM |
| 426 | is a directory. */ |
| 427 | |
| 428 | bool copy_into_self; |
| 429 | return (copy (from, to, to_dirfd, to_relname, 0, x, ©_into_self, NULL) |
| 430 | ? COPY_OK : COPY_FAILED); |
| 431 | } |
| 432 | |
| 433 | /* Set the attributes of file or directory NAME aka DIRFD+RELNAME. |
| 434 | Return true if successful. */ |
no test coverage detected