Skip to content

Commit

Permalink
xattr feature: enable it on mac too
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvestre committed Dec 26, 2024
1 parent 1180905 commit 2deeb78
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/uu/cp/src/cp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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:
//
Expand Down
2 changes: 1 addition & 1 deletion src/uucore/src/lib/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/uucore/src/lib/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2deeb78

Please sign in to comment.