mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 12:07:46 +00:00
cp: make --preserve
use the defaults when empty
This commit is contained in:
parent
0324a9480e
commit
8591d99c1b
1 changed files with 6 additions and 1 deletions
|
@ -745,7 +745,12 @@ impl Options {
|
||||||
attributes.push(Attribute::from_str(attribute_str)?);
|
attributes.push(Attribute::from_str(attribute_str)?);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
attributes
|
// `--preserve` case, use the defaults
|
||||||
|
if attributes.is_empty() {
|
||||||
|
DEFAULT_ATTRIBUTES.to_vec()
|
||||||
|
} else {
|
||||||
|
attributes
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if matches.get_flag(options::ARCHIVE) {
|
} else if matches.get_flag(options::ARCHIVE) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue