Skip to content

Commit 2d3b68c

Browse files
mv: format copy_file_with_hardlinks_helper mkfifo error mapping
1 parent 797c4f5 commit 2d3b68c

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
@@ -1451,13 +1451,15 @@ fn copy_file_with_hardlinks_helper(
14511451
.file_type(),
14521452
) {
14531453
// rustix::fs::mkfifoat is linux only
1454-
nix::unistd::mkfifo(to, nix::sys::stat::Mode::from_bits_truncate(0o666)).map_err(|err| {
1455-
RenameError::Formatted(translate!(
1456-
"mv-error-cannot-create-regular-file",
1457-
"to" => to.quote(),
1458-
"err" => strip_errno(&err.into())
1459-
))
1460-
})?;
1454+
nix::unistd::mkfifo(to, nix::sys::stat::Mode::from_bits_truncate(0o666)).map_err(
1455+
|err| {
1456+
RenameError::Formatted(translate!(
1457+
"mv-error-cannot-create-regular-file",
1458+
"to" => to.quote(),
1459+
"err" => strip_errno(&err.into())
1460+
))
1461+
},
1462+
)?;
14611463
// Preserve ownership (uid/gid) from the source
14621464
let _ = preserve_ownership(from, to);
14631465
} else {

0 commit comments

Comments
 (0)