From 0fb3ffb8adb5ca8fde92fbb2d4dc4598d2ca8af2 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 27 Dec 2023 23:35:29 +0100 Subject: [PATCH] install: document the need_copy function --- src/uu/install/src/install.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/uu/install/src/install.rs b/src/uu/install/src/install.rs index 7487c90bc..87980ac5b 100644 --- a/src/uu/install/src/install.rs +++ b/src/uu/install/src/install.rs @@ -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 { 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