mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 12:07:46 +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
|
/// 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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue