From 13c281c5fc64719756ff00d5f9027b76643009d5 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Fri, 2 Oct 2015 13:26:13 +0200 Subject: [PATCH] add aspellDicDir variable to enable storing the aspell dict away from the config dir --- src/aspell/rclaspell.cpp | 14 ++++++++++++-- src/sampleconf/mimemap | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/aspell/rclaspell.cpp b/src/aspell/rclaspell.cpp index 1a1f7c1f..14cfd856 100644 --- a/src/aspell/rclaspell.cpp +++ b/src/aspell/rclaspell.cpp @@ -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")); } diff --git a/src/sampleconf/mimemap b/src/sampleconf/mimemap index d100237f..e866256c 100644 --- a/src/sampleconf/mimemap +++ b/src/sampleconf/mimemap @@ -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