Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
Change to fs.statSync
Browse files Browse the repository at this point in the history
Looks like electron hacked in statSyncNoExcpetion but it doesn't work anymore with 0.13.0

Fix brave/browser-laptop#7015

Auditors: @bsclifton
  • Loading branch information
bbondy committed Feb 3, 2017
1 parent 8423a0a commit b705a0c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/spellchecker.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,8 @@ var getDictionaryPath = function() {
try {
// HACK: Special case being in an asar archive
var unpacked = dict.replace('.asar' + path.sep, '.asar.unpacked' + path.sep);
if (require('fs').statSyncNoException(unpacked)) {
dict = unpacked;
}
require('fs').statSync(unpacked)
dict = unpacked;
} catch (error) {
}
return dict;
Expand Down

1 comment on commit b705a0c

@bsclifton
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

Please sign in to comment.