Bug 444965 - Ark only extracts the main folder, making it empty
Summary: Ark only extracts the main folder, making it empty
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: 21.08.3
Platform: Other Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Elvis Angelaccio
Depends on:
Reported: 2021-11-04 17:36 UTC by Andre Freitas S.
Modified: 2021-11-09 15:52 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 21.12


Note You need to log in before you can comment on or make changes to this bug.
Description Andre Freitas S. 2021-11-04 17:36:17 UTC
Ark cant extract a zipped file, only extracts empty folders, neither via right click and extract on dolphin nor double clicking it to open it in ark itself. Preview works with file names in ark though.

1.  Download systemd/zram-generator from github as a .zip
2.  Open with Ark
3. Try to extract  or open any file inside that first zip file

  -Only the parent folder inside the  zipped file is extracted, being, however, empty.
  -Attempts to drag and drop (extract) a single folder from the zip file result only in empty folders, for example: trying to extract the folder zram-generator-main.zip/zram-generator-main/etc results in the extracted etc folder, containing the systemd folder, but without any file that these folders should contain.
  -Attempts to open text files inside the zip file also fail.
  -however, ark correctly displays every folder and file name correctly in the preview.

.zip file (zram-generator-main.zip) is opened, all of it's content including parent folder (in this case zram-generator-main), its files, folders  and what is contained in them is successfully extracted. Text files for example would also be correctly loaded and read.
Linux/KDE Plasma: Arch, 5.14.16-1 linux kernel, x11, mesa driver.
(available in About System)
KDE Plasma Version: 5.23.2
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.2

https://github.com/systemd/zram-generator link of the zip file that I downloaded, downlaoding again doesnt help.
I have had this problem before, couldn't extract correctly a zip originated from a windows computer, however, windows extracted it without any problems.
If that helps, the zip only contains a folder, and that folder contains every other file. 
bsdtar -xf also extracts without any problems.
Comment 1 Andre Freitas S. 2021-11-04 18:55:09 UTC
video if it's useful https://opensourcewindowsxplasma.tumblr.com/post/666948870155239424/bug-report
Comment 2 Albert Astals Cid 2021-11-04 22:04:03 UTC
I can reproduce that
Comment 3 Bug Janitor Service 2021-11-04 22:42:12 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/ark/-/merge_requests/69
Comment 4 Albert Astals Cid 2021-11-08 22:05:38 UTC
Git commit 70ead5fe6d1005fbcbce252030bfb351f1c5e26f by Albert Astals Cid.
Committed on 08/11/2021 at 22:01.
Pushed by aacid into branch 'release/21.12'.

zip: Fix detection of backslashed zips

If the \ is escaped then it's not a \ for folders but for filenames

M  +8    -5    plugins/libzipplugin/libzipplugin.cpp