viewer-private#217 Cef log was deleted too often

delete once per session, not once per instance

# Conflicts:
#	indra/newview/llviewermedia.cpp
master
Andrey Kleshchev 2024-04-26 23:54:40 +03:00 committed by Andrey Lihatskiy
parent a5c8d4f180
commit 88f503ecc3
2 changed files with 8 additions and 8 deletions

View File

@ -2354,6 +2354,14 @@ void LLAppViewer::initLoggingAndGetLastDuration()
{
LL_WARNS("MarkerFile") << duration_log_msg << LL_ENDL;
}
std::string user_data_path_cef_log = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "cef.log");
if (gDirUtilp->fileExists(user_data_path_cef_log))
{
std::string user_data_path_cef_old = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "cef.old");
LLFile::remove(user_data_path_cef_old, ENOENT);
LLFile::rename(user_data_path_cef_log, user_data_path_cef_old);
}
}
}

View File

@ -1730,14 +1730,6 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
std::string user_data_path_cache = gDirUtilp->getCacheDir(false);
user_data_path_cache += gDirUtilp->getDirDelimiter();
std::string user_data_path_cef_log = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "cef.log");
std::string user_data_path_cef_old = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "cef.old");
if (gDirUtilp->fileExists(user_data_path_cef_log))
{
LLFile::remove(user_data_path_cef_old, ENOENT);
LLFile::rename(user_data_path_cef_log, user_data_path_cef_old);
}
// See if the plugin executable exists
llstat s;
if(LLFile::stat(launcher_name, &s))