workaround segfault in compiler on macos-clang-intel
XCode 14 seems to be allergic to the string-literal in this lambda expression Change-Id: I1de59883923352c7aa83cc81adafb0218432381a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169030 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
This commit is contained in:
parent
e6d98900a9
commit
bba1193359
1 changed files with 7 additions and 4 deletions
|
@ -86,17 +86,20 @@ OString generateMD5(const void* pData, size_t length)
|
|||
return aBuffer.makeStringAndClear();
|
||||
}
|
||||
|
||||
OString const & getCacheFolder()
|
||||
// workaround segfault with XCode 14
|
||||
OString get_CacheFolder_impl()
|
||||
{
|
||||
static OString const aCacheFolder = []()
|
||||
{
|
||||
OUString url(u"${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/cache/"_ustr);
|
||||
rtl::Bootstrap::expandMacros(url);
|
||||
|
||||
osl::Directory::create(url);
|
||||
|
||||
return OUStringToOString(url, RTL_TEXTENCODING_UTF8);
|
||||
}();
|
||||
}
|
||||
|
||||
OString const & getCacheFolder()
|
||||
{
|
||||
static OString const aCacheFolder = get_CacheFolder_impl();
|
||||
return aCacheFolder;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue