|
|
@ -142,9 +142,9 @@ impl Mapping {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fs::symlink(src, dst)
|
|
|
|
fs::symlink(src, dst)
|
|
|
|
.await
|
|
|
|
.await
|
|
|
|
.map_err(|e| ChrootError::Link(dst.to_owned(), e))?;
|
|
|
|
.map_err(|e| ChrootError::Link(src.to_owned(), e))?;
|
|
|
|
Ok(MappingHandle::Link(LinkDrop {
|
|
|
|
Ok(MappingHandle::Link(LinkDrop {
|
|
|
|
path: dst.to_owned(),
|
|
|
|
path: src.to_owned(),
|
|
|
|
}))
|
|
|
|
}))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -152,12 +152,12 @@ impl Mapping {
|
|
|
|
if dst.exists() && dst.is_file() {
|
|
|
|
if dst.exists() && dst.is_file() {
|
|
|
|
fs::remove_file(dst)
|
|
|
|
fs::remove_file(dst)
|
|
|
|
.await
|
|
|
|
.await
|
|
|
|
.map_err(|e| ChrootError::Copy(dst.to_owned(), e))?;
|
|
|
|
.map_err(|e| ChrootError::Copy(src.to_owned(), e))?;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fs::copy(src, dst)
|
|
|
|
fs::copy(src, dst)
|
|
|
|
.await
|
|
|
|
.await
|
|
|
|
.map_err(|e| ChrootError::Copy(dst.to_owned(), e))?;
|
|
|
|
.map_err(|e| ChrootError::Copy(src.to_owned(), e))?;
|
|
|
|
|
|
|
|
|
|
|
|
Ok(MappingHandle::None)
|
|
|
|
Ok(MappingHandle::None)
|
|
|
|
}
|
|
|
|
}
|
|
|
|