--- a/src/aspell/rclaspell.cpp
+++ b/src/aspell/rclaspell.cpp
@@ -220,8 +220,18 @@
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"));
}