Skip to content

Unable to access dupplicate filenames within an archive #488

@mat813

Description

@mat813

Describe the bug
I get zip files from external services, and from time to time, there are duplicate filenames within an archive. I naively use this code to access the archive, and I only get partial content of the archive with it.

for file_number in 0..archive.len() {
    let mut zip_file = archive.by_index(file_number)?;
    let mut buf = Vec::new()
    zip_file.read_to_end(&mut buf)?;
    // stuff
}

To Reproduce
You can use this file test.zip

It does not seem to be possible to access all files in the archive.

Expected behavior
Accessing all the files from the archive.

Desktop (please complete the following information):

  • Version 7.0.0 of zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions