Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If a file is empty, still try to search it.
Files like /proc/cpuinfo will advertise themselves as a normal file with size 0. Normally, this isn't a problem, but if ripgrep decides to use a memory map, it skipped searching if the file was empty since it's an error to memory map an empty file. Instead of returning 0, we should just fall back to standard read calls. Fixes BurntSushi#55.
- Loading branch information