summaryrefslogtreecommitdiff
path: root/external/hunspell/hunspell-fdo48017-wfopen.patch
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2014-07-19 03:44:07 +0200
committerMichael Stahl <mstahl@redhat.com>2014-08-04 13:33:02 +0200
commit9548c4ab5db6889ee91f01a8207bf4009d623f9f (patch)
treeb45b10bea8809a32176badb3575e89f5e60307f6 /external/hunspell/hunspell-fdo48017-wfopen.patch
parente52d26fda8df76c47bc90db592adc564227e6dfb (diff)
fdo#80363 add _wfullpath to expand ".." in dictionary pathslibreoffice-4-3-0
Change-Id: I6c9edd0b4d2c63f7735d090e5d2d72d5fb81b921 Reviewed-on: https://gerrit.libreoffice.org/10400 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit 7efd83bb29ef8be8c78c4da5452fe3293ed15ea4) Reviewed-on: https://gerrit.libreoffice.org/10405 (cherry picked from commit 24e9950f68ca57c454dbb35cf8562d82e76a42e7) combined with fdo#80363 _wfullpath in MyThes and Hyphen (cherry picked from commit 0ad283adb51b3a1bb777e6341e61541d4bffaa44) (cherry picked from commit 45e4cdcc66d01a987c4edc715cb4cf083868b5ff)
Diffstat (limited to 'external/hunspell/hunspell-fdo48017-wfopen.patch')
-rw-r--r--external/hunspell/hunspell-fdo48017-wfopen.patch9
1 files changed, 7 insertions, 2 deletions
diff --git a/external/hunspell/hunspell-fdo48017-wfopen.patch b/external/hunspell/hunspell-fdo48017-wfopen.patch
index 47b803bc6529..37203be5c3f9 100644
--- a/external/hunspell/hunspell-fdo48017-wfopen.patch
+++ b/external/hunspell/hunspell-fdo48017-wfopen.patch
@@ -13,7 +13,7 @@ diff -ru hunspell/src/hunspell/csutil.cxx build/hunspell/src/hunspell/csutil.cxx
#ifdef OPENOFFICEORG
# include <unicode/uchar.h>
#else
-@@ -46,6 +50,21 @@
+@@ -51,6 +51,26 @@
static struct unicode_info2 * utf_tbl = NULL;
static int utf_tbl_count = 0; // utf_tbl can be used by multiple Hunspell instances
@@ -23,9 +23,14 @@ diff -ru hunspell/src/hunspell/csutil.cxx build/hunspell/src/hunspell/csutil.cxx
+ if (strncmp(path, WIN32_LONG_PATH_PREFIX, 4) == 0) {
+ int len = MultiByteToWideChar(CP_UTF8, 0, path, -1, NULL, 0);
+ wchar_t *buff = (wchar_t *) malloc(len * sizeof(wchar_t));
++ wchar_t *buff2 = (wchar_t *) malloc(len * sizeof(wchar_t));
++ FILE * f = NULL;
+ MultiByteToWideChar(CP_UTF8, 0, path, -1, buff, len);
-+ FILE * f = _wfopen(buff, (strcmp(mode, "r") == 0) ? L"r" : L"rb");
++ if (_wfullpath( buff2, buff, len ) != NULL) {
++ f = _wfopen(buff2, (strcmp(mode, "r") == 0) ? L"r" : L"rb");
++ }
+ free(buff);
++ free(buff2);
+ return f;
+ }
+#endif