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

InvalidExtraField on macos #100

Open
ahaoboy opened this issue Feb 13, 2025 · 0 comments
Open

InvalidExtraField on macos #100

ahaoboy opened this issue Feb 13, 2025 · 0 comments

Comments

@ahaoboy
Copy link

ahaoboy commented Feb 13, 2025

Describe the bug

These two files cannot be decompressed on the macos platform

https://github.com/oven-sh/bun/releases/latest/download/bun-darwin-x64.zip
https://github.com/oven-sh/bun/releases/latest/download/bun-darwin-aarch64.zip

---- read_bun stdout ----
thread 'read_bun' panicked at rc-zip-sync\tests\integration_tests.rs:56:32:
called `Result::unwrap()` on an `Err` value: Format(InvalidExtraField)
stack backtrace:
   0: rust_begin_unwind
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf\library/std\src/panicking.rs:665:5
   1: core::panicking::panic_fmt
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf\library/core\src/panicking.rs:74:14
   2: core::result::unwrap_failed
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf\library/core\src/result.rs:1700:5
   3: core::result::Result<T,E>::unwrap
             at C:\Users\ace\.rustup\toolchains\1.83.0-x86_64-pc-windows-gnu\lib/rustlib/src/rust\library\core\src\result.rs:1104:23
   4: integration_tests::read_bun
             at .\tests\integration_tests.rs:56:19
   5: integration_tests::read_bun::{{closure}}
             at .\tests\integration_tests.rs:52:14
   6: core::ops::function::FnOnce::call_once
             at C:\Users\ace\.rustup\toolchains\1.83.0-x86_64-pc-windows-gnu\lib/rustlib/src/rust\library\core\src\ops\function.rs:250:5
   7: core::ops::function::FnOnce::call_once
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf\library/core\src\ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

To Reproduce

Download the file and add the test function

(Maybe a simple command line tool could be implemented?)

#[test]
fn read_bun() {
    corpus::install_test_subscriber();
    let f = File::open(zips_dir().join("bun.zip")).unwrap();
    let archive = f.read_zip().unwrap();
    assert_eq!(archive.entries().count(), 2);
}

Expected behavior
Can decompress the file correctly

cargo-bins/cargo-binstall#2049

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant