mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 19:47:45 +00:00
cp: fix "cp
always creates backup"
This commit is contained in:
parent
332767e548
commit
1d64162218
1 changed files with 1 additions and 1 deletions
|
@ -579,7 +579,7 @@ impl Options {
|
|||
let recursive = matches.is_present(OPT_RECURSIVE) || matches.is_present(OPT_RECURSIVE_ALIAS)
|
||||
|| matches.is_present(OPT_ARCHIVE);
|
||||
|
||||
let backup = matches.is_present(OPT_BACKUP) || matches.is_present(OPT_SUFFIX);
|
||||
let backup = matches.is_present(OPT_BACKUP) || (matches.occurrences_of(OPT_SUFFIX) > 0);
|
||||
|
||||
// Parse target directory options
|
||||
let no_target_dir = matches.is_present(OPT_NO_TARGET_DIRECTORY);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue