From e225d0ebddf12c0442cea7bc09d74b6dbf7a0ca1 Mon Sep 17 00:00:00 2001 From: Hecklezz Date: Thu, 8 Jan 2026 03:38:19 +1000 Subject: [PATCH] Fixed Omnifilter not loading settings with unicode in the file path --- indra/newview/omnifilterengine.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/indra/newview/omnifilterengine.cpp b/indra/newview/omnifilterengine.cpp index 94bfb45faf..b222dceaa0 100644 --- a/indra/newview/omnifilterengine.cpp +++ b/indra/newview/omnifilterengine.cpp @@ -26,6 +26,7 @@ #include "omnifilterengine.h" +#include "fsyspath.h" #include "llnotificationsutil.h" #include "llsdserialize.h" #include "llviewercontrol.h" @@ -237,13 +238,13 @@ void OmnifilterEngine::loadNeedles() return; } - if (!std::filesystem::exists(mNeedlesXMLPath)) + if (!std::filesystem::exists(fsyspath(mNeedlesXMLPath))) { // file does not exist (yet), just return empty return; } - if (!std::filesystem::is_regular_file(mNeedlesXMLPath)) + if (!std::filesystem::is_regular_file(fsyspath(mNeedlesXMLPath))) { LL_DEBUGS("Omnifilter") << "Omnifilter storage at '" << mNeedlesXMLPath << "' is not a regular file." << LL_ENDL; LLSD args; @@ -252,7 +253,7 @@ void OmnifilterEngine::loadNeedles() return; } - if (std::filesystem::file_size(mNeedlesXMLPath) == 0) + if (std::filesystem::file_size(fsyspath(mNeedlesXMLPath)) == 0) { // file exists but is empty, this should not happen, so alert the user, they might have lost their needles LL_DEBUGS("Omnifilter") << "Omnifilter storage file is empty." << mNeedlesXMLPath << LL_ENDL;