sourcegraph / srclib

srclib is a polyglot code analysis library, built for hackability. It consists of language analysis toolchains (currently for Go and Java, with Python, JavaScript, and Ruby in beta) with a common output format, and a CLI tool for running the analysis.
https://srclib.org
Other
942 stars 62 forks source link

toolchain: fix find failing when directory contains file symlink #125

Closed MaikuMori closed 9 years ago

MaikuMori commented 9 years ago

Seems like I manage to use srclib in unorthodox ways.

Basically I figured why not set $SRCLIBPATH to something like $HOME/.srclib:$GOPATH/src (it as it turns out not a good idea anyway). And one of the packages had a symlink to file which broke toolchain.List

Before fix it would fail with:

lstat /some/something/README.md: not a directory

if README.md was a symlink.

samertm commented 9 years ago

This looks good to me. Thanks for the PR!