From a29ff3c637f44bc3539d496ea47484a69748e945 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20M=2E=20Bezerra?= Date: Sat, 15 Oct 2022 22:22:52 -0300 Subject: [PATCH] fix error message when compressing zip archive --- src/archive/zip.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/archive/zip.rs b/src/archive/zip.rs index 22311bf..efc4667 100644 --- a/src/archive/zip.rs +++ b/src/archive/zip.rs @@ -4,7 +4,6 @@ use std::os::unix::fs::PermissionsExt; use std::{ env, - fs::File, io::{self, prelude::*}, path::{Path, PathBuf}, sync::mpsc, @@ -223,7 +222,7 @@ where options }; - let mut file = File::open(entry.path())?; + let mut file = fs::File::open(entry.path())?; writer.start_file( path.to_str().unwrap(), options.last_modified_time(get_last_modified_time(&file)), @@ -256,7 +255,7 @@ fn display_zip_comment_if_exists(file: &ZipFile) { } } -fn get_last_modified_time(file: &File) -> DateTime { +fn get_last_modified_time(file: &fs::File) -> DateTime { file.metadata() .and_then(|metadata| metadata.modified()) .map_err(|_| ()) -- 2.11.4.GIT