diff options
| author | Rye <rye@alchemyviewer.org> | 2025-12-30 11:39:16 -0500 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2026-01-07 02:15:43 +0200 |
| commit | 25dc8660efedecfd9f021142ac1e4ff3639e80d4 (patch) | |
| tree | 3751a0f21917bbe3d460ae2b613c7e5070d55dae /indra/newview/lllogchat.cpp | |
| parent | b74a3c25d16685b8dfad8880e20ac99c5769d2e4 (diff) | |
Clean up LLFile and LLFilesystem operations to reduce temporaries allocations and utf8->utf16 conversions
Fix LLFile::tmpdir failing when temp directory is located in a unicode path on windows
Add Tracy profiler tagging to LLFile that's disabled by default
Replace LLFile::utf8StringToWstring with our fsyspath std::filesystem::path adapter
Introduce std::filesystem::path to llifstream/llofstream wrappers
Add move operators to fsyspath to match copy operator
Restore LLUniqueFile RAII class for direct c file io wrapping and reducing merge conflicts with downstream code that may depend upon it
Signed-off-by: Rye <rye@alchemyviewer.org>
Diffstat (limited to 'indra/newview/lllogchat.cpp')
| -rw-r--r-- | indra/newview/lllogchat.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index 30ea255e24..405530f5bd 100644 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -453,7 +453,7 @@ void LLLogChat::loadChatHistory(const std::string& file_name, std::list<LLSD>& m // If we got here, we managed to stat the file. // Open the file to read in binary mode to prevent interpreting other characters as EOF - LLFILE* fptr = LLFile::fopen(log_file_name, "rb"); /*Flawfinder: ignore*/ + LLFILE* fptr = LLFile::fopen(log_file_name, TEXT("rb")); /*Flawfinder: ignore*/ if (!fptr) { // Ok, this is strange but not really tragic in the big picture of things LL_WARNS("ChatHistory") << "Unable to read file " << log_file_name << " after stat was successful" << LL_ENDL; @@ -890,7 +890,7 @@ bool LLLogChat::isAdHocTranscriptExist(std::string file_name) bool LLLogChat::isTranscriptFileFound(std::string fullname) { bool result = false; - LLFILE * filep = LLFile::fopen(fullname, "rb"); + LLFILE * filep = LLFile::fopen(fullname, TEXT("rb")); if (NULL != filep) { if (makeLogFileName("chat") == fullname) @@ -1183,7 +1183,7 @@ void LLLoadHistoryThread::loadHistory(const std::string& file_name, std::list<LL } bool load_all_history = load_params.has("load_all_history") ? load_params["load_all_history"].asBoolean() : false; - LLFILE* fptr = LLFile::fopen(LLLogChat::makeLogFileName(file_name), "rb");/*Flawfinder: ignore*/ + LLFILE* fptr = LLFile::fopen(LLLogChat::makeLogFileName(file_name), TEXT("rb"));/*Flawfinder: ignore*/ if (!fptr) { @@ -1192,17 +1192,17 @@ void LLLoadHistoryThread::loadHistory(const std::string& file_name, std::list<LL { std::string old_name(file_name); old_name.erase(old_name.size() - GROUP_CHAT_SUFFIX.size()); - fptr = LLFile::fopen(LLLogChat::makeLogFileName(old_name), "rb"); + fptr = LLFile::fopen(LLLogChat::makeLogFileName(old_name), TEXT("rb")); if (fptr) { fclose(fptr); LLFile::copy(LLLogChat::makeLogFileName(old_name), LLLogChat::makeLogFileName(file_name)); } - fptr = LLFile::fopen(LLLogChat::makeLogFileName(file_name), "rb"); + fptr = LLFile::fopen(LLLogChat::makeLogFileName(file_name), TEXT("rb")); } if (!fptr) { - fptr = LLFile::fopen(LLLogChat::oldLogFileName(file_name), "rb");/*Flawfinder: ignore*/ + fptr = LLFile::fopen(LLLogChat::oldLogFileName(file_name), TEXT("rb"));/*Flawfinder: ignore*/ if (!fptr) { mNewLoad = false; |
