Skip to content

Commit 9d82fa3

Browse files
dahcBenWiederhake
authored andcommitted
mv: avoid attempting to set xattr on redox
1 parent 5bf939a commit 9d82fa3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/uu/mv/src/mv.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use uucore::fs::{
2727
are_hardlinks_or_one_way_symlink_to_same_file, are_hardlinks_to_same_file,
2828
path_ends_with_terminator,
2929
};
30-
#[cfg(all(unix, not(target_os = "macos")))]
30+
#[cfg(all(unix, not(any(target_os = "macos", target_os = "redox"))))]
3131
use uucore::fsxattr;
3232
use uucore::update_control;
3333

@@ -634,7 +634,7 @@ fn rename_with_fallback(
634634
None
635635
};
636636

637-
#[cfg(all(unix, not(target_os = "macos")))]
637+
#[cfg(all(unix, not(any(target_os = "macos", target_os = "redox"))))]
638638
let xattrs =
639639
fsxattr::retrieve_xattrs(from).unwrap_or_else(|_| std::collections::HashMap::new());
640640

@@ -648,7 +648,7 @@ fn rename_with_fallback(
648648
move_dir(from, to, &options)
649649
};
650650

651-
#[cfg(all(unix, not(target_os = "macos")))]
651+
#[cfg(all(unix, not(any(target_os = "macos", target_os = "redox"))))]
652652
fsxattr::apply_xattrs(to, xattrs).unwrap();
653653

654654
if let Err(err) = result {
@@ -661,11 +661,11 @@ fn rename_with_fallback(
661661
};
662662
}
663663
} else {
664-
#[cfg(all(unix, not(target_os = "macos")))]
664+
#[cfg(all(unix, not(any(target_os = "macos", target_os = "redox"))))]
665665
fs::copy(from, to)
666666
.and_then(|_| fsxattr::copy_xattrs(&from, &to))
667667
.and_then(|_| fs::remove_file(from))?;
668-
#[cfg(any(target_os = "macos", not(unix)))]
668+
#[cfg(any(target_os = "macos", target_os = "redox", not(unix)))]
669669
fs::copy(from, to).and_then(|_| fs::remove_file(from))?;
670670
}
671671
}

0 commit comments

Comments
 (0)