From a9994f187a93b3f19af298f25da30c393d88bfd9 Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Sat, 2 Oct 2021 04:42:32 -0400 Subject: [PATCH] Fix warning from being unable to replace old SLVoice log file --- indra/newview/llvoicevivox.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 96da3ae3616..f4455742903 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -880,8 +880,13 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon() params.args.add(".log"); // rotate any existing log - std::string new_log = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "SLVoice.log"); + std::string old_log = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "SLVoice.old"); + if (gDirUtilp->fileExists(old_log)) + { + LLFile::remove(old_log); + } + std::string new_log = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "SLVoice.log"); if (gDirUtilp->fileExists(new_log)) { LLFile::rename(new_log, old_log); -- GitLab