1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 19:47:45 +00:00

fix(mv): don't panic if apply_xattrs fails

This commit fixes issue #6727 by returning the error status instead of
causing a panic. It aligns with the original GNU mv more closely.
This commit is contained in:
Alexander Shirokov 2024-12-07 12:23:06 +01:00
parent 094cab046c
commit 4e79a01513
No known key found for this signature in database
GPG key ID: 6020E4D7AFA8ECE7

View file

@ -679,7 +679,7 @@ fn rename_with_fallback(
};
#[cfg(all(unix, not(any(target_os = "macos", target_os = "redox"))))]
fsxattr::apply_xattrs(to, xattrs).unwrap();
fsxattr::apply_xattrs(to, xattrs)?;
if let Err(err) = result {
return match err.kind {