diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-04-26 23:54:40 +0300 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2024-04-27 01:40:57 +0300 |
commit | f69ac40e24e78fe265c81ff3785c185229764151 (patch) | |
tree | 0899e28e08b79feb846e65a07e0e23275041ccbe /indra | |
parent | cc7b416fb8e776c406db6a4f95e505398f5f7fd5 (diff) |
viewer-private#217 Cef log was deleted too often
delete once per session, not once per instance
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llappviewer.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llviewermedia.cpp | 9 |
2 files changed, 9 insertions, 8 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 547a1c49cd..67ef234129 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2352,6 +2352,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); + } } } diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 18cfa37fe1..d35c63200a 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1723,14 +1723,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)) @@ -1745,6 +1737,7 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ { media_source = new LLPluginClassMedia(owner); media_source->setSize(default_width, default_height); + std::string user_data_path_cef_log = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "cef.log"); media_source->setUserDataPath(user_data_path_cache, gDirUtilp->getUserName(), user_data_path_cef_log); media_source->setLanguageCode(LLUI::getLanguage()); media_source->setZoomFactor(zoom_factor); |