-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Cannot search in symlink #256
Comments
Oh interesting. I'm pretty sure this used to work. I wonder if it's a regression in 0.3. I'm on mobile, but can you try |
Same thing with `rg -j1 test db`. The problem already existed in 0.2.9
2016-11-27 14:46 GMT+01:00 Andrew Gallant <notifications@github.com>:
… Oh interesting. I'm pretty sure this used to work. I wonder if it's a
regression in 0.3. I'm on mobile, but can you try rg -j1 test db? Does
that work?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#256 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACMnYf9KOvxbl5rsOIeANAjx2Wdqyf-Mks5rCYmlgaJpZM4K9Jco>
.
|
I tried to have a look at this issue since it looked like a decent beginner bug - looks like running I'd just make it so that it displays a better message, something like |
This is indeed the intended behavior I think.
The only way a loop can happen is if you use
Great! I haven't actually looked into this bug yet (just got back from vaca), but I do think we should just do the right thing here and follow symlinks if they've been explicitly given as a positional parameter. If I've missed some complication here that you see and I don't, then don't hesitate to push back! :-) |
@jFransham Let me know if you want to take a crack at this! |
@BurntSushi Yeah, I'll get on it now. I was wondering whether you'd hang on opening if you had a recursive set of links (i.e. not a directory that contains a link to itself, but a link that transitively links to itself) but it looks like the Linux kernel just throws an exception. I don't know what the behaviour is on other operating systems (*BSD, Windows, OS X) but I'd guess that at best it's the same and at worst it's not considered to be a problem for the application developer. Either way, that can be tackled as a seperate bug if it ever becomes a problem. I'll get back with a PR soon. |
When given a root like `foo` where `foo` is a symlink, it should always be followed. This behavior is consistent with `foo/`, which will also be followed. See also: BurntSushi/ripgrep#256
Thanks for fixing this interaction bug in such a user friendly manner! 😃 |
db
is a symlink to a directory.I would expect it to traverse the symlink in the first example, or at least to show an error message that is less confusing ;)
The text was updated successfully, but these errors were encountered: