cago count will fail if a symlink points to a parent directory
d3zd3z opened this issue · 2 comments
d3zd3z commented
$ mkdir sample
$ cd sample
$ ln -s . foo
$ cargo count
Gathering information...
thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Os { code: 40, message: "Too many levels of symbolic links" } }', src/libcore/result.rs:731
This is similar to my other issue #6, but fails for a different reason.
Overall, cargo count should probably not be following symlinks that are directories. It may or may not want to follow ones pointing to regular files.
kbknapp commented
Yep, that's the route I plan on taking, just not following symlinks, at least until I have a better solution ;) thanks again!
kbknapp commented
This works now. cargo-count
doesn't follow symlinks by default. Even if you pass the new --follow-symlinks
(or -S
) with the example you give, it will only follow it to the max level and not panic.