Skip to content

Commit c64ec58

Browse files
committed
Existence check stats just in case
1 parent 29522e7 commit c64ec58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ FSWatcher.prototype._getWatchedDir = function(directory) {
312312
//
313313
// Returns boolean
314314
FSWatcher.prototype._hasReadPermissions = function(stats) {
315-
return Boolean(4 & parseInt((stats.mode & 0x1ff).toString(8)[0], 10));
315+
return Boolean(4 & parseInt(((stats && stats.mode) & 0x1ff).toString(8)[0], 10));
316316
};
317317

318318
// Private method: Handles emitting unlink events for

0 commit comments

Comments
 (0)