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

treat symlink as file when adding to zip / #402 #422

Merged
merged 2 commits into from
Aug 9, 2024
Merged

treat symlink as file when adding to zip / #402 #422

merged 2 commits into from
Aug 9, 2024

Conversation

fujiwara
Copy link
Owner

@fujiwara fujiwara commented Aug 9, 2024

Fix for resolving a symlink target with the --src option.

j3tm0t0 and others added 2 commits June 12, 2024 19:08
This commit modifies the `addToZip` function in `archive.go` to treat symlinks as files. If a file is a symlink, the function reads the symlink target and retrieves the file information for the target. This ensures that the correct file information is used when adding the file to the zip archive.

Refactor the code to handle symlinks and update the `path` variable accordingly before creating the zip file header.

This change improves the behavior of the `addToZip` function when dealing with symlinks, ensuring that the correct file information is used for symlinks in the zip archive.
add tests for symlink.
@fujiwara fujiwara merged commit d51ba89 into v1 Aug 9, 2024
4 checks passed
@fujiwara fujiwara deleted the pr402 branch August 9, 2024 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants