1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 19:17:43 +00:00

mktemp: use keep instead of deprecated into_path

This commit is contained in:
Daniel Hofstetter 2025-05-12 07:43:26 +02:00
parent 04164596d1
commit a6d9bfbaa0

View file

@ -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 => {