blob: 4c7ea91cb2856830681d82b68df94aca790c7ae1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
diff -ura package.orig/src/public/lib/SpellCheck.js package.new/src/public/lib/SpellCheck.js
--- package.orig/src/public/lib/SpellCheck.js 2018-12-31 23:10:21.364014246 +0100
+++ package.new/src/public/lib/SpellCheck.js 2018-12-31 23:21:27.153584606 +0100
@@ -156,12 +156,10 @@
if (this.availableDictionaries.length === 0) {
this.multiLanguage = false;
// Dictionaries path is correct for build
- this.dictionariesPath = path.join(
- app.getAppPath(),
- app.getAppPath().endsWith('app.asar') ? '..' : '.',
- 'dictionaries'
- );
- this.getDictionariesFromInstallDirectory();
+ if (fs.existsSync('/usr/share/hunspell')) {
+ this.dictionariesPath = '/usr/share/hunspell';
+ this.getDictionariesFromInstallDirectory();
+ }
} else {
this.multiLanguage = process.platform !== 'win32';
this.availableDictionaries = this.availableDictionaries.map((dict) => dict.replace('-', '_'));
|