1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-29 03:57:44 +00:00

cp: rename function

is_forbidden_copy_to_same_file -> is_forbidden_to_copy_to_same_file
This commit is contained in:
Daniel Hofstetter 2023-12-31 14:17:16 +01:00
parent 2c42623b6e
commit 902a128ea8

View file

@ -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 /// Copying to the same file is only allowed if both `--backup` and
/// `--force` are specified and the file is a regular file. /// `--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, source: &Path,
dest: &Path, dest: &Path,
options: &Options, options: &Options,
@ -1533,7 +1533,7 @@ fn handle_existing_dest(
) -> CopyResult<()> { ) -> CopyResult<()> {
// Disallow copying a file to itself, unless `--force` and // Disallow copying a file to itself, unless `--force` and
// `--backup` are both specified. // `--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()); return Err(format!("{} and {} are the same file", source.quote(), dest.quote()).into());
} }