diff --git a/examples/append.rs b/examples/append.rs index 8bb1e4d8..6c5e41d9 100644 --- a/examples/append.rs +++ b/examples/append.rs @@ -1,9 +1,11 @@ use std::{ fs::{File, OpenOptions}, + io::{Read, Write}, path::{Path, PathBuf}, str::FromStr, }; use zip; +use zip::write::SimpleFileOptions; fn gather_files<'a, T: Into<&'a Path>>(path: T, files: &mut Vec) { let path: &Path = path.into(); @@ -46,7 +48,7 @@ fn real_main() -> i32 { for file in files { append_zip - .start_file_from_path(file, Default::default()) + .start_file(file.to_string_lossy(), SimpleFileOptions::default()) .unwrap(); let mut f = File::open(file).unwrap();