1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-29 12:07:46 +00:00

xattr feature: enable it on mac too

This commit is contained in:
Sylvestre Ledru 2024-12-26 17:10:01 +01:00
parent 1180905b5e
commit 2deeb7882c
3 changed files with 5 additions and 5 deletions

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:
//

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;

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