diff --git a/src/uu/mktemp/src/mktemp.rs b/src/uu/mktemp/src/mktemp.rs index ea8e080b0..d689115a6 100644 --- a/src/uu/mktemp/src/mktemp.rs +++ b/src/uu/mktemp/src/mktemp.rs @@ -468,8 +468,8 @@ fn make_temp_dir(dir: &Path, prefix: &str, rand: usize, suffix: &str) -> UResult match builder.tempdir_in(dir) { Ok(d) => { - // `into_path` consumes the TempDir without removing it - let path = d.into_path(); + // `keep` consumes the TempDir without removing it + let path = d.keep(); Ok(path) } Err(e) if e.kind() == ErrorKind::NotFound => {