Skip to content
This repository was archived by the owner on Mar 26, 2025. It is now read-only.

Skips symlinks when walking files in a dir #146

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dcarney
Copy link

@dcarney dcarney commented Dec 20, 2018

When walking a path (say, a large vendor/ directory in a Go repo), it's common to encounter symlinks. Attempting to stat/read these symlinks leads to spurious errors like the following:

2018/12/19 18:15:19 Unable to stat "vendor/github.com/grpc-ecosystem/go-grpc-middleware/auth/README.md": stat vendor/github.com/grpc-ecosystem/go-grpc-middleware/auth/README.md: no such file or directory
2018/12/19 18:15:19 Unable to stat "vendor/github.com/grpc-ecosystem/go-grpc-middleware/logging/README.md": stat vendor/github.com/grpc-ecosystem/go-grpc-middleware/logging/README.md: no such file or directory

This PR adds a simple check to see if a file is a symlink before writing it to the channel of files to check.

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

Successfully merging this pull request may close these issues.

1 participant