redhotpenguin / perl-Archive-Zip

Archive::Zip as seen at https://metacpan.org/pod/Archive::Zip
Other
15 stars 44 forks source link

OS call symlink while creating an archive? #86

Open jernst opened 3 years ago

jernst commented 3 years ago

The "if" section starting here: https://github.com/redhotpenguin/perl-Archive-Zip/blob/2385b6754b18c6cbe7aba93c3d7de9a6fc97e70e/lib/Archive/Zip/Member.pm#L1400 makes no sense to me. Why would one ever invoke the OS function "create symbolic link" while creating an archive? It also creates a rather strange error message under some rather peculiar circumstances: https://github.com/uboslinux/ubos-admin/issues/803#issuecomment-757556046

I believe the "if" section needs to be removed; the else section works as intended for all cases.

blgl commented 3 years ago

The _writeData method is called from extractToFileHandle when extracting; in that case you do want to create a symlink. However, Archive::Zip's symlink support is unfinished and unusable. My stab at finishing it can be found here:

https://www.stacken.kth.se/~blgl/0001-finish-symlink-support.patch.gz

No tests are included.

jkahrman commented 2 years ago

Duplicate of https://github.com/redhotpenguin/perl-Archive-Zip/issues/81