Bug 454688 - If a zip contains multiple files with the same name, Ark will only show one of them
Summary: If a zip contains multiple files with the same name, Ark will only show one o...
Status: REPORTED
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: 21.12.3
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-01 08:16 UTC by Isaac Cohen
Modified: 2022-06-01 08:26 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
My test zip (454 bytes, application/zip)
2022-06-01 08:26 UTC, Isaac Cohen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Isaac Cohen 2022-06-01 08:16:59 UTC
Recently I was working with a zip file that had strange behavior (when extracting it asked whether I wanted to replace the files I already extracted). It turned out the zip contained multiple files with the same name at the same directory level. I tried to reproduce such a zip, but only succeeded by the method outlined here: https://stackoverflow.com/questions/17606573/how-to-add-two-files-with-the-same-file-name-into-a-single-zip-archive-file

I found that other archiving tools such as Engrampa will show the individual files with the same name whereas Ark only shows one file in their place. I thought it would be nice to add a feature to Ark that does this too.

STEPS TO REPRODUCE
1. First create three files like this:
echo "Test1" >> file1
echo "Test2" >> file2
echo "Test3" >> file3

Note: It's important that the filenames should be the same length. This makes step 3 easier.

2. Archive them into a zip:
zip test.zip file1 file2 file3

3. Open a hex editor and change the names of two of the files to match the third. For instance, change all occurrences of "file2" and "file3" to "file1". There will be two occurrences of the name for each file in the zip. If the names are different lengths there will probably be other fields to change as well.

4. View the files in the zip with:
unzip -l test.zip

You should see multiple files with the same name.

5. Open the zip with Ark

OBSERVED RESULT
There is only one file.

EXPECTED RESULT
There should be multiple files with the same name as in the output of unzip -l


SOFTWARE/OS VERSIONS
Operating System: Kubuntu 22.04
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3
Kernel Version: 5.17.5-051705-generic (64-bit)
Comment 1 Isaac Cohen 2022-06-01 08:26:33 UTC
Created attachment 149369 [details]
My test zip

I'm uploading my test zip so it can save people time