Skip to content

Commit 4e79a01

Browse files
committed
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.
1 parent 094cab0 commit 4e79a01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/uu/mv/src/mv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ fn rename_with_fallback(
679679
};
680680

681681
#[cfg(all(unix, not(any(target_os = "macos", target_os = "redox"))))]
682-
fsxattr::apply_xattrs(to, xattrs).unwrap();
682+
fsxattr::apply_xattrs(to, xattrs)?;
683683

684684
if let Err(err) = result {
685685
return match err.kind {

0 commit comments

Comments
 (0)