try fix by gz decoder

This commit is contained in:
Pakin 2025-09-08 11:25:46 +07:00
parent 0149a5b0b1
commit 7be069e965
3 changed files with 5 additions and 2 deletions

View file

@ -28,10 +28,11 @@ impl Peekable for LastBuildFirmware {
let mut peeked = Vec::new();
let file = File::open(self.path.clone()).unwrap();
let mut ar = Archive::new(file);
let decompressed = flate2::read::GzDecoder::new(file);
let mut ar = Archive::new(decompressed);
for file2 in ar.entries().unwrap() {
let f = unsafe { file2.unwrap_unchecked() };
let f = file2.unwrap();
peeked.push(
f.path()
.unwrap()