mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
install: document the need_copy function
This commit is contained in:
@@ -869,7 +869,6 @@ fn preserve_timestamps(from: &Path, to: &Path) -> UResult<()> {
|
||||
///
|
||||
fn copy(from: &Path, to: &Path, b: &Behavior) -> UResult<()> {
|
||||
if b.compare && !need_copy(from, to, b)? {
|
||||
println!("no need to copy");
|
||||
return Ok(());
|
||||
}
|
||||
// Declare the path here as we may need it for the verbose output below.
|
||||
@@ -938,7 +937,7 @@ fn need_copy(from: &Path, to: &Path, b: &Behavior) -> UResult<bool> {
|
||||
let all_modes: u32 = 0o7777;
|
||||
|
||||
// Check if any special mode bits are set in the specified mode,
|
||||
// source file mode, or destination file mode. If so, copy is needed.
|
||||
// source file mode, or destination file mode.
|
||||
if b.specified_mode.unwrap_or(0) & extra_mode != 0
|
||||
|| from_meta.mode() & extra_mode != 0
|
||||
|| to_meta.mode() & extra_mode != 0
|
||||
|
||||
Reference in New Issue
Block a user