Better path methods

This commit is contained in:
topjohnwu
2025-04-24 16:14:00 -07:00
committed by John Wu
parent 0c70b7670c
commit 4ad26d3dfb
2 changed files with 14 additions and 11 deletions
+2 -1
View File
@@ -346,7 +346,8 @@ impl Cpio {
let mut buf = cstr::buf::default();
// Make sure its parent directories exist
if out.parent(&mut buf) {
if let Some(dir) = out.parent_dir() {
buf.push_str(dir);
buf.mkdirs(0o755)?;
}