Open
Description
Please tick this box to confirm you have reviewed the above.
- I have a different issue.
What version of ripgrep are you using?
ripgrep 14.1.0
How did you install ripgrep?
pacman
What operating system are you using ripgrep on?
Arch Linux
Describe your bug.
Some directories in ~/.ignore aren't ignored correctly.
What are the steps to reproduce the behavior?
Run this script ~/test
under ~/testdir
:
#!/bin/bash
mkdir -p ~/testdir/sub/sub2
cd ~/testdir
chmod -r sub/sub2
echo 'sub/sub2' >> ~/.ignore
echo 'sub/sub2/' >> ~/.ignore
echo '/testdir/sub/sub2' >> ~/.ignore
echo '/testdir/sub/sub2/' >> ~/.ignore
rg --debug test
What is the actual behavior?
[~/testdir]$ ~/test
rg: DEBUG|rg::flags::parse|crates/core/flags/parse.rs:97: no extra arguments found from configuration file
rg: DEBUG|rg::flags::hiargs|crates/core/flags/hiargs.rs:1099: using heuristics to determine whether to read from stdin or search ./ (is_readable_stdin=false, stdin_consumed=false, mode=Search(Standard))
rg: DEBUG|rg::flags::hiargs|crates/core/flags/hiargs.rs:1109: heuristic chose to search ./
rg: DEBUG|rg::flags::hiargs|crates/core/flags/hiargs.rs:1260: found hostname for hyperlink configuration: t480s
rg: DEBUG|rg::flags::hiargs|crates/core/flags/hiargs.rs:1270: hyperlink format: ""
rg: DEBUG|rg::flags::hiargs|crates/core/flags/hiargs.rs:174: using 8 thread(s)
rg: DEBUG|grep_regex::config|crates/regex/src/config.rs:175: assembling HIR from 1 fixed string literals
rg: DEBUG|globset|crates/globset/src/lib.rs:453: built glob set; 0 literals, 0 basenames, 12 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 0 regexes
rg: DEBUG|globset|crates/globset/src/lib.rs:453: built glob set; 8 literals, 0 basenames, 0 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 0 regexes
rg: ./sub/sub2: Permission denied (os error 13)
rg: No files were searched, which means ripgrep probably applied a filter you didn't expect.
Running with --debug will show why files are being skipped.
[~/testdir]$
What is the expected behavior?
~/testdir/sub/sub2
should be ignored, i.e. the rg: ./sub/sub2: Permission denied (os error 13)
error is unexpected.