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

361: Don't return filepath.SkipDir from the WalkFunc when excluding symlinked directories… #362

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

metmikel
Copy link

…, as the item at the path being processed is a symlink and according to https://pkg.go.dev/path/filepath#WalkFunc, returning filepath.SkipDir from WalkFunc when the item being processed is not a directory will skip the parent directory - which is not the desired behavior.

…ymlinked directories, as the item at the path being processed is a symlink and according to https://pkg.go.dev/path/filepath#WalkFunc, returning filepath.SkipDir from WalkFunc when the item being processed is not a directory will skip the parent directory - which is not the desired behavior.
@metmikel metmikel requested a review from a team as a code owner August 20, 2024 05:11
Copy link

hashicorp-cla-app bot commented Aug 20, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@SBGoods SBGoods left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @metmikel 👋🏾,
Thank you for submitting this PR. The change and rationale here makes sense to me. Before approving this PR, though, is it possible to add a unit test case in zip_archiver_test.go and acceptance test cases in resource_archive_file_zip_test.go and data_source_archive_file_zip_test.go?

Also it looks like this issue also affects tar_achiver.go, so if you would like to make corresponding changes/tests for the tar archiver that would be appreciated! If not, no worries, I'll open up a follow up PR after merging this one.

Thanks!

@metmikel
Copy link
Author

Hi @SBGoods,
Apologies for the long delay replying. I was hoping to make the changes you suggested, but I have to confess that this is the first time I have done anything in Go and while I was hoping to do some learning in that area, work commitments have got in the way. Hopefully somebody else who is impacted by this issue will be able to pick it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants