Fix extract example
This commit is contained in:
parent
1b63377d69
commit
8010b29b5e
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue