Skip to content

Commit c30b8d5

Browse files
afnan-mojumdersylvestre
authored andcommitted
mv: format copy_file_with_hardlinks_helper mkfifo error mapping
1 parent 09e1a8e commit c30b8d5

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

‎src/uu/mv/src/mv.rs‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,13 +1458,15 @@ fn copy_file_with_hardlinks_helper(
14581458
.file_type(),
14591459
) {
14601460
// rustix::fs::mkfifoat is linux only
1461-
nix::unistd::mkfifo(to, nix::sys::stat::Mode::from_bits_truncate(0o666)).map_err(|err| {
1462-
RenameError::Formatted(translate!(
1463-
"mv-error-cannot-create-regular-file",
1464-
"to" => to.quote(),
1465-
"err" => strip_errno(&err.into())
1466-
))
1467-
})?;
1461+
nix::unistd::mkfifo(to, nix::sys::stat::Mode::from_bits_truncate(0o666)).map_err(
1462+
|err| {
1463+
RenameError::Formatted(translate!(
1464+
"mv-error-cannot-create-regular-file",
1465+
"to" => to.quote(),
1466+
"err" => strip_errno(&err.into())
1467+
))
1468+
},
1469+
)?;
14681470
// Preserve ownership (uid/gid) from the source
14691471
let _ = preserve_ownership(from, to);
14701472
} else {

0 commit comments

Comments
 (0)