From 7ea19c7c5dd2f99d8fc4db3e2337f7a9072b715b Mon Sep 17 00:00:00 2001 From: tommady Date: Thu, 12 Oct 2023 10:42:44 +0800 Subject: [PATCH] Update src/uu/cp/src/cp.rs Co-authored-by: Sylvestre Ledru --- src/uu/cp/src/cp.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/uu/cp/src/cp.rs b/src/uu/cp/src/cp.rs index b1dd94dbd..eb14e0904 100644 --- a/src/uu/cp/src/cp.rs +++ b/src/uu/cp/src/cp.rs @@ -1889,14 +1889,10 @@ fn handling_no_preserve_mode(options: &Options, org_mode: u32) -> u32 { target_os = "macos-12", target_os = "freebsd", )))] - const MODE_RW_UGO: u32 = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH; - #[cfg(not(any( - target_os = "android", - target_os = "macos", - target_os = "macos-12", - target_os = "freebsd", - )))] - const S_IRWXUGO: u32 = S_IRWXU | S_IRWXG | S_IRWXO; + { + const MODE_RW_UGO: u32 = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH; + const S_IRWXUGO: u32 = S_IRWXU | S_IRWXG | S_IRWXO; + } #[cfg(any( target_os = "android",