Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Catch exception after lstat call #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/path-scanner.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ class PathScanner extends EventEmitter
stat: (filePath) ->
# lstat is SLOW, but what other way to determine if something is a directory or file ?
# also, sync is about 200ms faster than async...
stat = fs.lstatSync(filePath)
try
stat = fs.lstatSync(filePath)
catch e
return null

if @options.follow and stat.isSymbolicLink()
if @isInternalSymlink(filePath)
Expand Down