xattr feature: enable it on mac too

This commit is contained in:
Sylvestre Ledru
2024-12-26 17:25:12 +01:00
parent 1180905b5e
commit 2deeb7882c
3 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -17,7 +17,7 @@ use std::os::unix::ffi::OsStrExt;
#[cfg(unix)]
use std::os::unix::fs::{FileTypeExt, PermissionsExt};
use std::path::{Path, PathBuf, StripPrefixError};
#[cfg(all(unix, not(any(target_os = "android", target_os = "macos"))))]
#[cfg(all(unix, not(target_os = "android")))]
use uucore::fsxattr::copy_xattrs;
use clap::{builder::ValueParser, crate_version, Arg, ArgAction, ArgMatches, Command};
@@ -1605,11 +1605,11 @@ pub(crate) fn copy_attributes(
})?;
handle_preserve(&attributes.xattr, || -> CopyResult<()> {
#[cfg(all(unix, not(any(target_os = "android", target_os = "macos"))))]
#[cfg(all(unix, not(target_os = "android")))]
{
copy_xattrs(source, dest)?;
}
#[cfg(not(all(unix, not(any(target_os = "android", target_os = "macos")))))]
#[cfg(not(all(unix, not(target_os = "android"))))]
{
// The documentation for GNU cp states:
//
+1 -1
View File
@@ -54,7 +54,7 @@ pub mod process;
#[cfg(all(target_os = "linux", feature = "tty"))]
pub mod tty;
#[cfg(all(unix, not(target_os = "macos"), feature = "fsxattr"))]
#[cfg(all(unix, feature = "fsxattr"))]
pub mod fsxattr;
#[cfg(all(unix, not(target_os = "fuchsia"), feature = "signals"))]
pub mod signals;
+1 -1
View File
@@ -99,7 +99,7 @@ pub use crate::features::wide;
#[cfg(feature = "fsext")]
pub use crate::features::fsext;
#[cfg(all(unix, not(target_os = "macos"), feature = "fsxattr"))]
#[cfg(all(unix, feature = "fsxattr"))]
pub use crate::features::fsxattr;
//## core functions