From 8010b29b5e278779079010133ae153f7b61b24d8 Mon Sep 17 00:00:00 2001 From: Mathijs van de Nes Date: Tue, 17 Mar 2015 16:54:51 +0100 Subject: [PATCH] Fix extract example --- examples/extract.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/extract.rs b/examples/extract.rs index a92bcb96..df8a2935 100644 --- a/examples/extract.rs +++ b/examples/extract.rs @@ -29,7 +29,7 @@ fn main() if comment.len() > 0 { println!(" File comment: {}", comment); } } - fs::create_dir_all(outpath.parent().unwrap_or(std::path::Path::new(""))).unwrap(); + create_directory(outpath.parent().unwrap_or(std::path::Path::new(""))); if (&*file.name()).ends_with("/") { create_directory(&outpath); @@ -61,7 +61,7 @@ fn sanitize_filename(filename: &str) -> std::path::PathBuf std::path::Path::new(no_null_filename) .components() .filter(|component| *component != std::path::Component::ParentDir) - .fold(std::path::PathBuf::new(""), |mut path, ref cur| { + .fold(std::path::PathBuf::new("."), |mut path, ref cur| { path.push(cur.as_os_str()); path })