$OpenBSD: patch-mozilla_extensions_spellcheck_hunspell_src_mozHunspell_cpp,v 1.3 2011/07/22 05:25:27 landry Exp $
--- mozilla/extensions/spellcheck/hunspell/src/mozHunspell.cpp.orig	Tue Jul 13 23:28:11 2010
+++ mozilla/extensions/spellcheck/hunspell/src/mozHunspell.cpp	Wed Jul 21 10:11:56 2010
@@ -63,6 +63,7 @@
 #include "nsISimpleEnumerator.h"
 #include "nsIDirectoryEnumerator.h"
 #include "nsIFile.h"
+#include "nsILocalFile.h"
 #include "nsDirectoryServiceUtils.h"
 #include "nsDirectoryServiceDefs.h"
 #include "mozISpellI18NManager.h"
@@ -342,6 +343,16 @@ mozHunspell::LoadDictionaryList()
       appDir->AppendNative(NS_LITERAL_CSTRING("dictionaries"));
       LoadDictionariesFromDir(appDir);
     }
+  }
+
+  // try to load the generic mozilla/dictionaries
+  nsCOMPtr<nsIFile> mozillaDir;
+  nsCOMPtr<nsILocalFile> localFile;
+  rv = NS_NewNativeLocalFile(nsDependentCString(
+    "${LOCALBASE}/share/mozilla-dicts"), PR_TRUE, getter_AddRefs(localFile));
+  if (localFile && NS_SUCCEEDED(rv)) {
+    localFile->QueryInterface(NS_GET_IID(nsIFile), getter_AddRefs(mozillaDir));
+    LoadDictionariesFromDir(mozillaDir);
   }
 
   nsCOMPtr<nsISimpleEnumerator> dictDirs;
