Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple issues with symlinks #797

Open
voidc opened this issue Aug 27, 2024 · 0 comments
Open

Multiple issues with symlinks #797

voidc opened this issue Aug 27, 2024 · 0 comments
Labels
help wanted Need outside help symbolic links Symbolic link support

Comments

@voidc
Copy link

voidc commented Aug 27, 2024

While debugging an issue with zips containing symlinks I noticed a couple of things:

  • The behavior of mz_zip_writer_add_file and mz_zip_writer_add_path is inconsistent. The latter skips symlinks if store_links and follow_links are false while the former does not. This makes mz_zip_writer_add_file effectively behave like if follow_links were true.
  • Attributes are always determined with lstat regardless of follow_links. If follow_links is true, I would expect the writer to store the attributes of the symlink target. Currently, we get zip entries with the contents of the symlink target that also have the ISLINK attribute set. This causes errors when reading such zips, because the reader tries to create a symlink treating the file contents as target path.
  • If both store_links and follow_links are set, we get store_links behavior and follow_links is ignored.
@nmoinvaz nmoinvaz added help wanted Need outside help symbolic links Symbolic link support labels Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Need outside help symbolic links Symbolic link support
Projects
None yet
Development

No branches or pull requests

2 participants