Skip to content

hacks: support symbolic links in .zip files

Nirbheek Chauhan requested to merge nirbheek/cerbero:symlinks-zip-files into main

Add support for re-creating symbolic links when unpacking .zip files, copying the complete implementation of ZipFile._extract_member() and adding the needed modifications. As a safeguard to avoid following symlinks when re-unpacking the same file, which could result in wrong output, always unlink each destination file before creating it.

This is needed for newer versions of the Android NDK which e.g. link "llvm-ranlib" to "llvm-ar" and a few others.

Originally reported at https://github.com/Igalia/wpe-android/issues/50

Moved from !835 (closed)

Edited by Nirbheek Chauhan

Merge request reports