Bug 472057 - ZIP files with backslashes as path separators for directories do not extract properly
Summary: ZIP files with backslashes as path separators for directories do not extract ...
Status: RESOLVED DUPLICATE of bug 469345
Alias: None
Product: ark
Classification: Applications
Component: plugins (show other bugs)
Version: 23.04.3
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-07 17:27 UTC by rwc265
Modified: 2023-07-13 05:07 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rwc265 2023-07-07 17:27:16 UTC
SUMMARY

On ZIP files that use Windows-style backslashes for directories, the directories are not preserved when extracting. Instead, the entire path ends up concatenated to the beginning of the file name. For example, if you had a ZIP file that has backslashes with a folder named "foo" and a file named "bar.txt" inside that folder, it would extract as "foo\bar.txt", instead of "bar.txt" inside of a folder named "foo".

STEPS TO REPRODUCE
1. Download seemingly any ZIP file that uses backslashes, like this one (https://invent.kde.org/utilities/ark/uploads/e2feec301ef03530a3722f15d6991b9b/foo.zip) that I got from a merge request (https://invent.kde.org/utilities/ark/-/merge_requests/28) to add support for ZIP files formatted like this
2. Try to extract the files normally
3. If you examine the contents extracted, you'll see that any directories were not preserved, and instead concatenated to the beginning of the file

OBSERVED RESULT

Directories are not preserved, they instead become part of the file name

EXPECTED RESULT

Directories should be preserved. As in my example, if a ZIP with backslashes has "foo" as a folder" and "bar.txt" as a content of that folder", it should be extracted as a folder called "foo", with "bar.txt" in it.

SOFTWARE/OS VERSIONS
Kernel Version: 6.3.9-1
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.107.0
Qt Version: 5.15.10
OS: openSUSE Tumbleweed
Windowing System: Wayland, if that matters at all for this issue

ADDITIONAL INFORMATION

While openSUSE Tumbleweed as of while I'm writing this has Ark 23.04.2, I did build 23.04.3 from source to see if this was maybe resolved already, but I still had the same issue. I even looked at libzip's GitHub release page and saw they updated the version for the first time in a year a couple weeks ago. Thinking that maybe libzip itself broke something with the latest version when I updated my system a few days ago, I tried building the previous version of libzip (1.9.2) and then building the latest Ark with that older version of libzip too, but with no change to the issue.
Comment 1 2wxsy58236r3 2023-07-13 05:07:38 UTC
*** This bug has been marked as a duplicate of bug 469345 ***