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