-
Notifications
You must be signed in to change notification settings - Fork 73
Description
Describe the bug
One file served by the soldeer registry seems to have a weird directory structure, which never was an issue when using zip-extract
. But since that crate now is marked as deprecated and recommends to use zip
directly, I am no longer able to extract that file (see link below).
The file was probably created with zip v2.1.3
according to the crawler's lockfile, but take this with a grain of salt (I can't be sure the file was created by the crawler).
To Reproduce
Steps to reproduce the behavior:
- Download https://soldeer-revisions.s3.amazonaws.com/forge-std/1_9_2_06-08-2024_17:31:25_forge-std-1.9.2.zip
- Try to unzip:
let file = File::open(path).unwrap();
let mut zip = zip::ZipArchive::new(file).unwrap();
zip.extract(dir).unwrap();
- Observe the error:
InvalidArchive("Invalid file path")
Expected behavior
The file should extract successfully, just like zip-extract
, 7-zip
and the unzip
CLI managed to do. Maybe their implementation are more robust against weird paths?
Screenshots
7-zip shows a _
folder at the root
Windows Explorer shows an empty folder
Desktop (please complete the following information):
- OS: Ubuntu (WSL2)
Additional context