diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index 6eb9dbe0f..a8d430ca5 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -653,9 +653,7 @@ void LLFloaterChat::onClickToggleActiveSpeakers(void* userdata) // static void LLFloaterChat::onClickChatHistoryOpen(void* userdata) { - char command[256]; - - sprintf(command, "\"%s%s%s\"", gDirUtilp->getPerAccountChatLogsDir().c_str(), gDirUtilp->getDirDelimiter().c_str(), "chat.txt"); + std::string command("\"" + LLLogChat::makeLogFileName("chat") + "\""); gViewerWindow->getWindow()->ShellEx(command); llinfos << command << llendl; diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index ef503ff5c..6311998fe 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -1079,12 +1079,10 @@ void LLFloaterIMPanel::onClickHistory() { if (mOtherParticipantUUID.notNull()) { - char command[256]; // [Ansariel: Display name support] - //std::string fullname(gDirUtilp->getScrubbedFileName(getTitle())); - std::string fullname(gDirUtilp->getScrubbedFileName(mSessionLabel)); + //std::string command("\"" + LLLogChat::makeLogFileName(getTitle()) + "\""); + std::string command("\"" + LLLogChat::makeLogFileName(mSessionLabel) + "\""); // [/Ansariel: Display name support] - sprintf(command, "\"%s%s%s.txt\"", gDirUtilp->getPerAccountChatLogsDir().c_str(), gDirUtilp->getDirDelimiter().c_str(), fullname.c_str()); gViewerWindow->getWindow()->ShellEx(command); llinfos << command << llendl;