Commit 5bab298f by Maarten L. Hekkelman

search data_dir as well as cache_dir, for MacOS

parent fd42b7f4
...@@ -3106,7 +3106,10 @@ void File::loadDictionary(const char* dict) ...@@ -3106,7 +3106,10 @@ void File::loadDictionary(const char* dict)
{ {
// might be a compressed dictionary on disk // might be a compressed dictionary on disk
fs::path p = dict; fs::path p = dict;
p = p.parent_path() / (p.filename().string() + ".gz"); if (p.extension() == ".dic")
p = p.parent_path() / (p.filename().string() + ".gz");
else
p = p.parent_path() / (p.filename().string() + ".dic.gz");
if (not fs::exists(p)) if (not fs::exists(p))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment