diff --git a/Common/config/development-mac.json b/Common/config/development-mac.json index 6f5be5f5..a262ef84 100644 --- a/Common/config/development-mac.json +++ b/Common/config/development-mac.json @@ -56,5 +56,10 @@ "docbuilderAllFontsPath": "../../App_Data/docbuilder/AllFonts.js", "errorfiles": "error" } + }, + "SpellChecker": { + "server": { + "dictDir": "../dictionaries" + } } } \ No newline at end of file diff --git a/Common/config/development-windows.json b/Common/config/development-windows.json index de0f504d..54ed4005 100644 --- a/Common/config/development-windows.json +++ b/Common/config/development-windows.json @@ -56,5 +56,10 @@ "docbuilderAllFontsPath": "../../App_Data/docbuilder/AllFonts.js", "errorfiles": "error" } + }, + "SpellChecker": { + "server": { + "dictDir": "../dictionaries" + } } } \ No newline at end of file diff --git a/Common/config/production-linux.json b/Common/config/production-linux.json index 34138802..23c2d6db 100644 --- a/Common/config/production-linux.json +++ b/Common/config/production-linux.json @@ -60,5 +60,10 @@ }, "FileStorage": { "directory": "/var/lib/onlyoffice/documentserver/App_Data" + }, + "SpellChecker": { + "server": { + "dictDir": "/var/www/onlyoffice/documentserver/server/SpellChecker/dictionaries" + } } } diff --git a/Common/config/production-windows.json b/Common/config/production-windows.json index 296d9ac3..c7b68cc4 100644 --- a/Common/config/production-windows.json +++ b/Common/config/production-windows.json @@ -57,5 +57,10 @@ "docbuilderPath": "../../FileConverter/bin/docbuilder.exe", "docbuilderAllFontsPath": "../../App_Data/docbuilder/AllFonts.js" } + }, + "SpellChecker": { + "server": { + "dictDir": "../dictionaries" + } } } diff --git a/SpellChecker/sources/spellCheck.js b/SpellChecker/sources/spellCheck.js index a5d4caca..db34b7fb 100644 --- a/SpellChecker/sources/spellCheck.js +++ b/SpellChecker/sources/spellCheck.js @@ -43,7 +43,7 @@ const languages = require('./languages'); const allLanguages = languages.allLanguages; const path = require('path'); const arrExistDictionaries = {}; -const pathDictionaries = path.join(__dirname, '../dictionaries'); +const pathDictionaries = require('config').get('SpellChecker.server.dictDir'); const arrDictionaries = {}; function spell(type, word, id) {