Replace an instance of MAX_PATH with 32767
... which is the approximate maximum of Windows API, as documented in https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation Change-Id: I152b0b499374167720d73a475f2502e52fc5a5dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163910 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
parent
3fef8ba992
commit
fa86d95014
1 changed files with 2 additions and 2 deletions
|
@ -31,8 +31,8 @@ const OUString& GetSofficeExe()
|
|||
{
|
||||
static const OUString s_sPath = []() {
|
||||
OUString result;
|
||||
wchar_t sPath[MAX_PATH];
|
||||
if (GetModuleFileNameW(nullptr, sPath, MAX_PATH) == 0)
|
||||
wchar_t sPath[32767];
|
||||
if (GetModuleFileNameW(nullptr, sPath, std::size(sPath)) == 0)
|
||||
return result;
|
||||
wchar_t* pSlashPos = wcsrchr(sPath, L'\\');
|
||||
if (pSlashPos == nullptr)
|
||||
|
|
Loading…
Reference in a new issue