From 360cb23d00b78dad3ecad245f659a0206f33f1a1 Mon Sep 17 00:00:00 2001 From: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Date: Wed, 30 Oct 2024 11:04:53 +1100 Subject: [PATCH] Fix returned `ExtractedFiles` in `do_extract_zip` Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --- crates/binstalk-downloader/src/download/zip_extraction.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/binstalk-downloader/src/download/zip_extraction.rs b/crates/binstalk-downloader/src/download/zip_extraction.rs index 3ac81f11..7130699c 100644 --- a/crates/binstalk-downloader/src/download/zip_extraction.rs +++ b/crates/binstalk-downloader/src/download/zip_extraction.rs @@ -13,7 +13,7 @@ pub(super) fn do_extract_zip(f: File, dir: &Path) -> Result Result { - extracted_files.add_file(&path); + extracted_files.add_file(&name); cfg_if! { if #[cfg(windows)] { do_extract_file()?; @@ -57,7 +56,7 @@ pub(super) fn do_extract_zip(f: File, dir: &Path) -> Result (), EntryKind::File => { - extracted_files.add_file(&path); + extracted_files.add_file(&name); do_extract_file()?; } }