Closed
Description
Originally reported here: nodejs/node-v0.x-archive#7412
The root cause of the issue is that fs.readFile()
stats the file and reads the amount of bytes specified in the st_size
field. This works only for regular files.
The fix would be to check whether the ST_IFREG flag is set. If not, use a slower but more reliable method to read the entire file.
I think this is a "good first bug" for new contributors.