From 59241f9023803d886c4a4d61887911a2c8bc9776 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Thu, 29 Oct 2020 01:39:22 +1100 Subject: [PATCH] generate OCIO extraction directory BEFORE setting C locale for OCIO --- app/render/colormanager.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/render/colormanager.cpp b/app/render/colormanager.cpp index 2e4f496dd..3bf4e0164 100644 --- a/app/render/colormanager.cpp +++ b/app/render/colormanager.cpp @@ -69,6 +69,10 @@ OCIO::ConstConfigRcPtr ColorManager::GetDefaultConfig() void ColorManager::SetUpDefaultConfig() { + // Extract OCIO config - kind of hacky, but it'll work + // Must do this before setting C locale + QString dir = QDir(QStandardPaths::writableLocation(QStandardPaths::CacheLocation)).filePath(QStringLiteral("ocioconf")); + OCIO_SET_C_LOCALE_FOR_SCOPE; if (!qgetenv("OCIO").isEmpty()) { @@ -82,9 +86,6 @@ void ColorManager::SetUpDefaultConfig() } } - // Extract OCIO config - kind of hacky, but it'll work - QString dir = QDir(QStandardPaths::writableLocation(QStandardPaths::CacheLocation)).filePath(QStringLiteral("ocioconf")); - FileFunctions::CopyDirectory(QStringLiteral(":/ocioconf"), dir, true);