Bug 415723 - [libzip] Ark doesn't preserve symlinks in zip files
Summary: [libzip] Ark doesn't preserve symlinks in zip files
Status: REOPENED
Alias: None
Product: ark
Classification: Applications
Component: plugins (show other bugs)
Version: 19.04.3
Platform: Fedora RPMs Linux
: NOR major
Target Milestone: ---
Assignee: Ragnar Thomsen
URL:
Keywords:
: 473186 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-12-30 22:35 UTC by John S.
Modified: 2023-08-16 14:36 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John S. 2019-12-30 22:35:18 UTC
SUMMARY
After unpacking a zip file with symlinks using Ark, the symlinks appear as regular files and don't point anywhere.

STEPS TO REPRODUCE
1. Create a test directory
2. Create any file within the directory
3. Create a symlink to the file
4. Create a zip archive (I did this with the `zip` utility, not sure if results are different when using Ark)
5. Delete the original files
6. Extract the zip archive using Ark

OBSERVED RESULT
Symlinks appear as regular files instead of symlinks.

EXPECTED RESULT
Symlinks should be preserved as links to their target files.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 31, kernel 5.3.16
KDE Plasma Version: 5.17.4
KDE Frameworks Version: 5.64.0
Qt Version: 5.12.5

ADDITIONAL INFORMATION
I tested extracting the same archive with the `unzip` utility and the GNOME archive manager on an Ubuntu 18.04 virtual machine and symlinks were preserved in both cases. I've used previous versions of Ark on zip files with symlinks successfully.
Comment 1 Elvis Angelaccio 2020-01-02 12:22:02 UTC
Can you check which zip plugin are you using? (Settings -> Configure Ark -> Plugins)
Comment 2 John S. 2020-01-02 14:27:02 UTC
Looks like it's using libzip. The only other plugin that looks like it handles zip files would be Info-zip, but it says that plugin provides legacy support for zip files. According to Fedora's package manager I have libzip 1.5.2 installed, but I don't know if this package is the same as the plugin that's being used. I can't find a corresponding package for Info-zip.
Comment 3 Elvis Angelaccio 2020-01-06 11:47:57 UTC
Info-zip is the 'zip'/'unzip' CLI program.
Comment 4 Christian Finnberg 2020-03-29 14:15:35 UTC
(In reply to Elvis Angelaccio from comment #3)
> Info-zip is the 'zip'/'unzip' CLI program.

I can confirm that unmarking Libzip makes symlinks to work. The p7zip lib works also
Comment 5 Blazej S 2023-03-25 15:43:17 UTC
(In reply to Christian Finnberg from comment #4)
> (In reply to Elvis Angelaccio from comment #3)
> > Info-zip is the 'zip'/'unzip' CLI program.
> 
> I can confirm that unmarking Libzip makes symlinks to work. The p7zip lib
> works also

Apparently that works only if you first open the archive in Ark, and click Extract in Ark GUI.
When rightclicking the archive -> Extract -> Basically any of the option it doesn't create the symlink.
Comment 6 Blazej S 2023-04-14 11:14:03 UTC
(In reply to Blazej S from comment #5)
> (In reply to Christian Finnberg from comment #4)
> > (In reply to Elvis Angelaccio from comment #3)
> > > Info-zip is the 'zip'/'unzip' CLI program.
> > 
> > I can confirm that unmarking Libzip makes symlinks to work. The p7zip lib
> > works also
> 
> Apparently that works only if you first open the archive in Ark, and click
> Extract in Ark GUI.
> When rightclicking the archive -> Extract -> Basically any of the option it
> doesn't create the symlink.

Turns out you have to close all dolphin sessions for the changes to take effect, so false alarm. Anyway, shouldn't this be mentioned in some kind of FAQ for Ark or its wiki page?
Comment 7 2wxsy58236r3 2023-08-16 14:36:57 UTC
*** Bug 473186 has been marked as a duplicate of this bug. ***