sal/osl/w32/security.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
New commits: commit 59402caefa12b922f2d0e2083e420a02356ea476 Author: Mike Kaganski <mike.kagan...@collabora.com> Date: Thu Sep 14 13:46:30 2017 +0300 tdf#103525: a blind fix: try Unicode function first Change-Id: If088efdcbf41807ac8fad2410953abb685c8ea01 Reviewed-on: https://gerrit.libreoffice.org/42274 Reviewed-by: Michael Stahl <mst...@redhat.com> Tested-by: Jenkins <c...@libreoffice.org> diff --git a/sal/osl/w32/security.cxx b/sal/osl/w32/security.cxx index 890a018a6515..fcec4d20f1f3 100644 --- a/sal/osl/w32/security.cxx +++ b/sal/osl/w32/security.cxx @@ -633,20 +633,20 @@ static bool GetSpecialFolder(rtl_uString **strPath, int nFolder) pSHGetSpecialFolderPathA = reinterpret_cast<BOOL (WINAPI *)(HWND, LPSTR, int, BOOL)>(GetProcAddress(hLibrary, "SHGetSpecialFolderPathA")); pSHGetSpecialFolderPathW = reinterpret_cast<BOOL (WINAPI *)(HWND, LPWSTR, int, BOOL)>(GetProcAddress(hLibrary, "SHGetSpecialFolderPathW")); - if (pSHGetSpecialFolderPathA) + if (pSHGetSpecialFolderPathW) { - if (pSHGetSpecialFolderPathA(GetActiveWindow(), PathA, nFolder, TRUE)) + if (pSHGetSpecialFolderPathW(GetActiveWindow(), SAL_W(PathW), nFolder, TRUE)) { - rtl_string2UString( strPath, PathA, (sal_Int32) strlen(PathA), osl_getThreadTextEncoding(), OUSTRING_TO_OSTRING_CVTFLAGS); - OSL_ASSERT(*strPath != nullptr); + rtl_uString_newFromStr( strPath, PathW); bRet = true; } } - else if (pSHGetSpecialFolderPathW) + else if (pSHGetSpecialFolderPathA) { - if (pSHGetSpecialFolderPathW(GetActiveWindow(), SAL_W(PathW), nFolder, TRUE)) + if (pSHGetSpecialFolderPathA(GetActiveWindow(), PathA, nFolder, TRUE)) { - rtl_uString_newFromStr( strPath, PathW); + rtl_string2UString( strPath, PathA, (sal_Int32) strlen(PathA), osl_getThreadTextEncoding(), OUSTRING_TO_OSTRING_CVTFLAGS); + OSL_ASSERT(*strPath != nullptr); bRet = true; } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits