Search hangs on files which atom does not have permission to read


As said, the ‘project find’ hangs when it tries to read a file which it does not have permission to read. It actually dumps a trace in the console, but does not seem to pop it open by default, making it look like the search has frozen.

You can duplicate this by doing the following in an empty directory.

echo string > 1; cp 1 2; cp 1 3; chmod 0 2; atom .

When this folder is opened, do search in project for the string ‘string’. It will find the string in file 1, and then hang, never finding the string in file 3.

If you pop open the developer tools by hand, we find:

Bad argument TypeError: Bad argument
  at Object.fs.closeSync (fs.js:383:18)
  at ChunkedLineReader.module.exports.ChunkedLineReader._read (/Applications/
  at (_stream_readable.js:334:10)
  at ChunkedLineReader.Readable.resume (_stream_readable.js:704:12)
  at ChunkedLineReader.Readable.on (_stream_readable.js:670:10)
  at PathSearcher.module.exports.PathSearcher.searchPath (/Applications/
  at searchPath (/Applications/
  at PathScanner.maybeSearchPath (/Applications/
  at PathScanner.EventEmitter.emit (events.js:123:20)
  at PathScanner.module.exports.PathScanner.processFile (/Applications/
  at /Applications/
  at Object.oncomplete (fs.js:97:15)


Can you file an issue here ?

There the devs/collaborators can see the bug.