Ensure parent directory exists before attempting to extract files
This commit is contained in:
parent
17c25c54bc
commit
b070a129f8
1 changed files with 6 additions and 0 deletions
|
@ -219,6 +219,12 @@ impl Node {
|
|||
}
|
||||
self.name.clone()
|
||||
};
|
||||
let p = PathBuf::from(&path);
|
||||
if let Some(parent) = p.parent() {
|
||||
if !parent.exists() {
|
||||
self.mkdir(&parent)?;
|
||||
}
|
||||
}
|
||||
match self.filetype {
|
||||
FileType::Eof => {}
|
||||
FileType::Fifo => {
|
||||
|
|
Loading…
Add table
Reference in a new issue