1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 15:51:15 +02:00

Validate tarball components

This commit is contained in:
Eelco Dolstra 2019-12-13 18:11:37 +01:00
parent 4581159e3f
commit 5a6d6da7ae
5 changed files with 27 additions and 5 deletions

View file

@ -11,7 +11,10 @@ pub extern "C" fn unpack_tarfile(
source: foreign::Source,
dest_dir: &str,
) -> CBox<Result<(), error::CppException>> {
CBox::new(util::tarfile::unpack_tarfile(source, dest_dir).map_err(|err| err.into()))
CBox::new(
util::tarfile::unpack_tarfile(source, std::path::Path::new(dest_dir))
.map_err(|err| err.into()),
)
}
#[no_mangle]