diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-09-22 22:18:55 +0300 |
---|---|---|
committer | akleshchev <117672381+akleshchev@users.noreply.github.com> | 2023-09-25 15:07:37 +0300 |
commit | 3ff0cd546ad8990a577b9f82cf3f73be85ed5555 (patch) | |
tree | c56626f1e7a4abd2278c7b6b76ff46fbd58f75b6 /indra/newview/lllogchat.cpp | |
parent | 145a5ffe7f57ec87b0604c2e06104a4eb3cb8644 (diff) |
SL-20188 Size of friend list affects time to open Preferences floater
Don't check every file when it's enough to know if there are any.
Diffstat (limited to 'indra/newview/lllogchat.cpp')
-rw-r--r-- | indra/newview/lllogchat.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index ba82ff0b0f..1592afc66c 100644 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -651,6 +651,27 @@ std::string LLLogChat::oldLogFileName(std::string filename) return scanResult; } +bool LLLogChat::transcriptFilesExist() +{ + std::string pattern = "*." + LL_TRANSCRIPT_FILE_EXTENSION; + // get Users log directory + std::string dirname = gDirUtilp->getPerAccountChatLogsDir(); + + // add final OS dependent delimiter + dirname += gDirUtilp->getDirDelimiter(); + + LLDirIterator iter(dirname, pattern); + std::string filename; + while (iter.next(filename)) + { + std::string fullname = gDirUtilp->add(dirname, filename); + if (isTranscriptFileFound(fullname)) + { + return true; + } + } + return false; +} // static void LLLogChat::findTranscriptFiles(std::string pattern, std::vector<std::string>& list_of_transcriptions) { |