aboutsummaryrefslogtreecommitdiff
path: root/nix-rust/src/c.rs
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-12-13 18:11:37 +0100
committerEelco Dolstra <edolstra@gmail.com>2019-12-13 19:05:26 +0100
commit5a6d6da7aea23a48126a77f98612518af66bc203 (patch)
treed21796b9843e5d87c0786b49acf70fe9ee92eca7 /nix-rust/src/c.rs
parent4581159e3f5a1cc38aa8e90dfd45f0a63354be44 (diff)
Validate tarball components
Diffstat (limited to 'nix-rust/src/c.rs')
-rw-r--r--nix-rust/src/c.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/nix-rust/src/c.rs b/nix-rust/src/c.rs
index 19e737a88..3feeb71a3 100644
--- a/nix-rust/src/c.rs
+++ b/nix-rust/src/c.rs
@@ -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]