-
Hello, I'd like to know what's the easiest way to debug filesystem operations? I'm not familiar with Rust but am happy to attempt to debug a problem I'm having, I just need a few pointers if possible. I have a very unique situation where I'm running ripgrep in Windows over a custom filesystem layer that makes use of ntfs reparse points to dynamically instantiate files(download from external location) only as they're required - at 'open' time is the most likely case. There's an interesting scenario where I can successfully run ripgrep from the cmd prompt just looking at certain file extensions that I know are already instanced locally, but if I do the same thing via FZF by setting FZF_COMMAND_DEFAULT to my ripgrep command it appears to result in more files of different extensions being read(downloaded) somehow.
... which I plan use as the place to start debugging if possible. This error message has nothing to do with ripgrep, by the way, so don't worry about this being an error (that's an issue on my side and I'm attempting to exploit it for debugging this issue).
So I'm trying to figure out exactly why running rg through fzf is causing this FS layer to 'instance' extra files with extensions that aren't Many thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
OK! I figured out the offending bit of code. It looks like the check for |
Beta Was this translation helpful? Give feedback.
OK! I figured out the offending bit of code. It looks like the check for
path_equals({d}ent, stdout)
is actually creating an open handle for the directory entry, and this check is done before the check to see if a path should be ignored. So I rearranged this in two places in walk.rs and now ripgrep from within fzf appears to operate as expected. Is this a valid solution (should I create a pull request for this change)?