Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace unmaintained dependency zip with zip_next #9436

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion tooling/bundler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ hex = "0.4"
semver = "1"
sha1 = "0.10"
sha2 = "0.10"
zip = { version = "0.6", default-features = false, features = [ "deflate" ] }
zip_next = { version = "1.0", default-features = false, features = [ "deflate" ] }
dunce = "1"

[target."cfg(target_os = \"windows\")".dependencies]
Expand Down
6 changes: 3 additions & 3 deletions tooling/bundler/src/bundle/updater_bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use std::{
};

use anyhow::Context;
use zip::write::FileOptions;
use zip_next::write::FileOptions;

// Build update
pub fn bundle_project(settings: &Settings, bundles: &[Bundle]) -> crate::Result<Vec<PathBuf>> {
Expand Down Expand Up @@ -216,9 +216,9 @@ pub fn create_zip(src_file: &Path, dst_file: &Path) -> crate::Result<PathBuf> {
.file_name()
.expect("Can't extract file name from path");

let mut zip = zip::ZipWriter::new(writer);
let mut zip = zip_next::ZipWriter::new(writer);
let options = FileOptions::default()
.compression_method(zip::CompressionMethod::Stored)
.compression_method(zip_next::CompressionMethod::Stored)
.unix_permissions(0o755);

zip.start_file(file_name.to_string_lossy(), options)?;
Expand Down
2 changes: 1 addition & 1 deletion tooling/bundler/src/bundle/windows/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use std::{
};

use sha2::Digest;
use zip::ZipArchive;
use zip_next::ZipArchive;

pub const WEBVIEW2_BOOTSTRAPPER_URL: &str = "https://go.microsoft.com/fwlink/p/?LinkId=2124703";
pub const WEBVIEW2_OFFLINE_INSTALLER_X86_URL: &str =
Expand Down
2 changes: 1 addition & 1 deletion tooling/bundler/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub enum Error {
ConvertError(#[from] num::TryFromIntError),
/// Zip error.
#[error("`{0}`")]
ZipError(#[from] zip::result::ZipError),
ZipError(#[from] zip_next::result::ZipError),
/// Hex error.
#[error("`{0}`")]
HexError(#[from] hex::FromHexError),
Expand Down