From 4e79a01513a5c75b057c8f4af7fadfe0158a9efd Mon Sep 17 00:00:00 2001 From: Alexander Shirokov Date: Sat, 7 Dec 2024 12:23:06 +0100 Subject: [PATCH] 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. --- src/uu/mv/src/mv.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uu/mv/src/mv.rs b/src/uu/mv/src/mv.rs index 9d8452b1e..7debf52c9 100644 --- a/src/uu/mv/src/mv.rs +++ b/src/uu/mv/src/mv.rs @@ -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 {