summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2022-04-09 16:55:19 -0500
committerMatt A. Tobin <email@mattatobin.com>2022-04-09 16:55:19 -0500
commit03921c137d18bdb34b2440fcefbe19cf26b81008 (patch)
treecb94055804a674bfbb8a336663de2459d505c6b9 /system
parent38fcfe29e034abf1e30b38519b6d903dc9dfa96f (diff)
downloadaura-central-03921c137d18bdb34b2440fcefbe19cf26b81008.tar.gz
Revert "Issue %3057 - Part 1: Stop using GetNativePath in hunspell."
This reverts commit 8a7bfad6d1c04aaeb4f28aed05bc4b317ddb438b.
Diffstat (limited to 'system')
-rw-r--r--system/intl/spellcheck/src/mozHunspell.cpp17
1 files changed, 5 insertions, 12 deletions
diff --git a/system/intl/spellcheck/src/mozHunspell.cpp b/system/intl/spellcheck/src/mozHunspell.cpp
index f7539d31c..de3fc4126 100644
--- a/system/intl/spellcheck/src/mozHunspell.cpp
+++ b/system/intl/spellcheck/src/mozHunspell.cpp
@@ -169,20 +169,13 @@ NS_IMETHODIMP mozHunspell::SetDictionary(const char16_t *aDictionary)
nsAutoCString dictFileName, affFileName;
-#ifdef XP_WIN
- // nsIFile->NativePath isn't safe for all character sets on Windows.
- // Use GetPath and pass it as a UTF-8 to the hunspell lib instead.
- // Hunspell 1.5+ supports UTF-8 file paths on Windows
- // by prefixing "\\\\?\\".
- nsAutoString affFileNameU;
- nsresult rv = affFile->GetPath(affFileNameU);
- NS_ENSURE_SUCCESS(rv, rv);
- affFileName.AssignLiteral("\\\\?\\");
- AppendUTF16toUTF8(affFileNameU, affFileName);
-#else
+ // XXX This isn't really good. nsIFile->NativePath isn't safe for all
+ // character sets on Windows.
+ // A better way would be to QI to nsIFile, and get a filehandle
+ // from there. Only problem is that hunspell wants a path
+
nsresult rv = affFile->GetNativePath(affFileName);
NS_ENSURE_SUCCESS(rv, rv);
-#endif
if (mAffixFileName.Equals(affFileName.get()))
return NS_OK;