|
|
@ -122,6 +122,7 @@ impl DirEntry {
|
|
|
|
match self {
|
|
|
|
match self {
|
|
|
|
DirEntry::File(file) => file.apply(cwd),
|
|
|
|
DirEntry::File(file) => file.apply(cwd),
|
|
|
|
DirEntry::Dir(p, children) => {
|
|
|
|
DirEntry::Dir(p, children) => {
|
|
|
|
|
|
|
|
let cwd = if p != cwd {
|
|
|
|
let cwd = cwd.join(p.file_name().unwrap());
|
|
|
|
let cwd = cwd.join(p.file_name().unwrap());
|
|
|
|
if !cwd.exists() {
|
|
|
|
if !cwd.exists() {
|
|
|
|
log::info!("Creating {cwd:?}");
|
|
|
|
log::info!("Creating {cwd:?}");
|
|
|
@ -129,6 +130,10 @@ impl DirEntry {
|
|
|
|
.into_diagnostic()
|
|
|
|
.into_diagnostic()
|
|
|
|
.with_context(|| format!("Creating directory {cwd:?}"))?;
|
|
|
|
.with_context(|| format!("Creating directory {cwd:?}"))?;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
cwd
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
p.to_owned()
|
|
|
|
|
|
|
|
};
|
|
|
|
for child in children {
|
|
|
|
for child in children {
|
|
|
|
child.apply(&cwd)?;
|
|
|
|
child.apply(&cwd)?;
|
|
|
|
}
|
|
|
|
}
|
|
|
|