Ensure parent directory exists before attempting to extract files
This commit is contained in:
parent
17c25c54bc
commit
b070a129f8
@ -219,6 +219,12 @@ impl Node {
|
|||||||
}
|
}
|
||||||
self.name.clone()
|
self.name.clone()
|
||||||
};
|
};
|
||||||
|
let p = PathBuf::from(&path);
|
||||||
|
if let Some(parent) = p.parent() {
|
||||||
|
if !parent.exists() {
|
||||||
|
self.mkdir(&parent)?;
|
||||||
|
}
|
||||||
|
}
|
||||||
match self.filetype {
|
match self.filetype {
|
||||||
FileType::Eof => {}
|
FileType::Eof => {}
|
||||||
FileType::Fifo => {
|
FileType::Fifo => {
|
||||||
|
Loading…
Reference in New Issue
Block a user