Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

cago count will fail if a symlink points to a parent directory #7

Closed
d3zd3z opened this issue Aug 22, 2015 · 2 comments
Closed

cago count will fail if a symlink points to a parent directory #7

d3zd3z opened this issue Aug 22, 2015 · 2 comments

Comments

@d3zd3z
Copy link

d3zd3z commented Aug 22, 2015

$ 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
Copy link
Owner

kbknapp commented Aug 22, 2015

Yep, that's the route I plan on taking, just not following symlinks, at least until I have a better solution ;) thanks again!

@kbknapp
Copy link
Owner

kbknapp commented Aug 25, 2015

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.

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

No branches or pull requests

2 participants