create parent before touching
This commit is contained in:
parent
fc417c4e6c
commit
102dca0d4d
@ -155,6 +155,9 @@ impl VoidBuilder {
|
|||||||
if src_data.is_dir() {
|
if src_data.is_dir() {
|
||||||
fs::create_dir_all(&dst)?;
|
fs::create_dir_all(&dst)?;
|
||||||
} else {
|
} else {
|
||||||
|
if let Some(parent) = dst.parent() {
|
||||||
|
fs::create_dir_all(parent)?;
|
||||||
|
}
|
||||||
fs::write(&dst, b"")?;
|
fs::write(&dst, b"")?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user