Bug 444965 - Ark only extracts the main folder, making it empty
Summary: Ark only extracts the main folder, making it empty
Status: RESOLVED FIXED
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
URL:
Keywords:
Depends on:
Blocks:
 
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


Attachments

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
SUMMARY
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.

STEPS TO REPRODUCE
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

OBSERVED RESULT
  -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.

EXPECTED RESULT
.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.
 
SOFTWARE/OS VERSIONS
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

ADDITIONAL INFORMATION
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

https://invent.kde.org/utilities/ark/commit/70ead5fe6d1005fbcbce252030bfb351f1c5e26f