add aspellDicDir variable to enable storing the aspell dict away from the config dir

This commit is contained in:
Jean-Francois Dockes 2015-10-02 13:26:13 +02:00
parent 374f775092
commit 13c281c5fc
2 changed files with 13 additions and 3 deletions

View File

@ -220,8 +220,18 @@ bool Aspell::ok() const
string Aspell::dicPath()
{
return path_cat(m_config->getConfDir(),
string("aspdict.") + m_lang + string(".rws"));
string ccdir;
m_config->getConfParam("aspellDicDir", ccdir);
if (ccdir.empty()) {
ccdir = m_config->getConfDir();
} else {
ccdir = path_tildexpand(ccdir);
// If not an absolute path, compute relative to config dir
if (!path_isabsolute(ccdir))
ccdir = path_cat(m_config->getConfDir(), ccdir);
}
return path_cat(ccdir, string("aspdict.") + m_lang + string(".rws"));
}

View File

@ -39,7 +39,7 @@
# .eml is used as an extension by several mail apps for a single message
# saved in raw MIME format. Mainly used here to get Thunderbird to open an
# extracted message.
# extracted message. Also used by Windows Live Mail
.eml = message/rfc822
.pdf = application/pdf