mirror of
https://github.com/uutils/coreutils
synced 2024-12-14 15:22:38 +00:00
cp: rename function
is_forbidden_copy_to_same_file -> is_forbidden_to_copy_to_same_file
This commit is contained in:
parent
2c42623b6e
commit
902a128ea8
1 changed files with 2 additions and 2 deletions
|
@ -1509,7 +1509,7 @@ fn backup_dest(dest: &Path, backup_path: &Path) -> CopyResult<PathBuf> {
|
|||
///
|
||||
/// Copying to the same file is only allowed if both `--backup` and
|
||||
/// `--force` are specified and the file is a regular file.
|
||||
fn is_forbidden_copy_to_same_file(
|
||||
fn is_forbidden_to_copy_to_same_file(
|
||||
source: &Path,
|
||||
dest: &Path,
|
||||
options: &Options,
|
||||
|
@ -1533,7 +1533,7 @@ fn handle_existing_dest(
|
|||
) -> CopyResult<()> {
|
||||
// Disallow copying a file to itself, unless `--force` and
|
||||
// `--backup` are both specified.
|
||||
if is_forbidden_copy_to_same_file(source, dest, options, source_in_command_line) {
|
||||
if is_forbidden_to_copy_to_same_file(source, dest, options, source_in_command_line) {
|
||||
return Err(format!("{} and {} are the same file", source.quote(), dest.quote()).into());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue