ksud_overlayfs: change find_temp_path to use keep() method for temporary directory since into_path() is deprecated

This commit is contained in:
rifsxd
2025-05-23 04:52:48 +06:00
parent 9189de4db1
commit 29725214f7

View File

@@ -192,7 +192,6 @@ fn is_ok_empty(dir: &str) -> bool {
}
}
#[allow(deprecated)]
fn find_temp_path() -> String {
use std::result::Result::Ok;
@@ -204,7 +203,7 @@ fn find_temp_path() -> String {
let r = tempfile::tempdir_in("/dev/");
match r {
Ok(tmp_dir) => {
if let Some(path) = tmp_dir.into_path().to_str() {
if let Some(path) = tmp_dir.keep().to_str() {
return path.to_string();
}
}