Skip to content

Commit f80e541

Browse files
Migrate from zip-extract to zip
`zip-extract` is deprecated
1 parent 7845a45 commit f80e541

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

updater/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
1616
tracing = "0.1.40"
1717
lazy_async_promise = "0.6.0"
1818
reqwest = "0.12.4"
19-
zip-extract = "0.4.1"
2019
open = "5.1.2"
2120
sysinfo = "0.37.0"
21+
zip = "4.5.0"

updater/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use lazy_async_promise::{
1313
StringStatus,
1414
};
1515
use sysinfo::{ProcessRefreshKind, ProcessesToUpdate, RefreshKind, System};
16+
use zip::ZipArchive;
1617

1718
const WAVEBREAKER_THEME: Theme = Theme {
1819
base: Color32::from_rgb(29, 32, 47),
@@ -170,10 +171,9 @@ impl MyEguiApp {
170171
))
171172
.map_err(|e| BoxedSendError(e.into()))?;
172173
}
174+
173175
// automatically overwrites existing files
174-
zip_extract::extract(Cursor::new(bytes), Path::new("."), false)
175-
.context("Failed to extract zip")
176-
.map_err(|e| BoxedSendError(e.into()))?;
176+
ZipArchive::new(Cursor::new(bytes))?.extract(Path::new("."))?;
177177

178178
s.send(StringStatus::new(
179179
Progress::from_percent(80),

0 commit comments

Comments
 (0)