mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-02 02:00:03 +00:00
Use rc-zip-sync for zip extraction (#1942)
* Use rc-zip-sync for zip extraction Fixed #1080 In this commit, binstalk-downloader is updated to - first download the zip into a temporary file, since there is no correct way to extract zip from a stream. - then use rc-zip-sync to read from the zip and extract it to filesystem. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com> * Fix returned `ExtractedFiles` in `do_extract_zip` Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Fix clippy in zip_extraction.rs Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --------- Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com> Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
This commit is contained in:
parent
c16790a16f
commit
e704abe7ac
5 changed files with 406 additions and 327 deletions
|
@ -7,6 +7,7 @@ use thiserror::Error as ThisError;
|
|||
use tracing::{debug, error, instrument};
|
||||
|
||||
pub use binstalk_types::cargo_toml_binstall::{PkgFmt, TarBasedFmt};
|
||||
pub use rc_zip_sync::rc_zip::error::Error as ZipError;
|
||||
|
||||
use crate::remote::{Client, Error as RemoteError, Response, Url};
|
||||
|
||||
|
@ -23,7 +24,6 @@ mod extracted_files;
|
|||
pub use extracted_files::{ExtractedFiles, ExtractedFilesEntry};
|
||||
|
||||
mod zip_extraction;
|
||||
pub use zip_extraction::ZipError;
|
||||
|
||||
#[derive(Debug, ThisError)]
|
||||
#[non_exhaustive]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue