From ce18f8a2a107a2a8c575dfd6831280bd522e16dc Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 27 Dec 2023 23:34:44 +0100 Subject: [PATCH] install: split the need_copy check --- src/uu/install/src/install.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/uu/install/src/install.rs b/src/uu/install/src/install.rs index 92910650d..d25863079 100644 --- a/src/uu/install/src/install.rs +++ b/src/uu/install/src/install.rs @@ -954,7 +954,10 @@ fn need_copy(from: &Path, to: &Path, b: &Behavior) -> UResult { if owner_id != to_meta.uid() { return Ok(true); } - } else if let Some(group_id) = b.group_id { + } + + // Check if the group ID is specified and differs from the destination file's group. + if let Some(group_id) = b.group_id { if group_id != to_meta.gid() { return Ok(true); }