summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
authorFrederick Martian <fredmartian@gmail.com>2025-10-25 17:08:35 +0200
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-12-10 20:33:58 +0200
commit3ca3ea75c333078013914e174564340f894573e2 (patch)
treec12dfa3492102e87c153a997d946c1d173a35666 /indra/newview/llappviewer.cpp
parent79f21027371f32a9268ce8d944e3d4727ddd8b55 (diff)
Add a new static function LLFile::size() to determine the size of a file_name.
Replace LLAPRFile::remove(), LLAPRFile::size() and LLAPRFile::isExist() with according functions from LLFile and retire these LLAPRFile methods and the never used LLAPRFile::rename(), LLAPRFile::makeDir() and LLAPRFile::removeDir() functions. Also clean up remarks about the threading safety of the APRCachePool, which is not used in these locations anymore.
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r--indra/newview/llappviewer.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 569fd30b21..f6e3139cc4 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -2268,7 +2268,7 @@ void errorCallback(LLError::ELevel level, const std::string &error_string)
LLAppViewer::instance()->writeDebugInfo();
std::string error_marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ERROR_MARKER_FILE_NAME);
- if (!LLAPRFile::isExist(error_marker_file, NULL, LL_APR_RB))
+ if (!LLFile::isfile(error_marker_file))
{
// If marker doesn't exist, create a marker with llerror code for next launch
// otherwise don't override existing file
@@ -3900,7 +3900,7 @@ void LLAppViewer::processMarkerFiles()
bool marker_is_same_version = true;
// first, look for the marker created at startup and deleted on a clean exit
mMarkerFileName = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,MARKER_FILE_NAME);
- if (LLAPRFile::isExist(mMarkerFileName, NULL, LL_APR_RB))
+ if (LLFile::isfile(mMarkerFileName))
{
// File exists...
// first, read it to see if it was created by the same version (we need this later)
@@ -3992,7 +3992,7 @@ void LLAppViewer::processMarkerFiles()
// check for any last exec event report based on whether or not it happened during logout
// (the logout marker is created when logout begins)
std::string logout_marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, LOGOUT_MARKER_FILE_NAME);
- if(LLAPRFile::isExist(logout_marker_file, NULL, LL_APR_RB))
+ if(LLFile::isfile(logout_marker_file))
{
if (markerIsSameVersion(logout_marker_file))
{
@@ -4004,11 +4004,11 @@ void LLAppViewer::processMarkerFiles()
{
LL_INFOS("MarkerFile") << "Logout crash marker '"<< logout_marker_file << "' found, but versions did not match" << LL_ENDL;
}
- LLAPRFile::remove(logout_marker_file);
+ LLFile::remove(logout_marker_file);
}
// and last refine based on whether or not a marker created during a non-llerr crash is found
std::string error_marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ERROR_MARKER_FILE_NAME);
- if(LLAPRFile::isExist(error_marker_file, NULL, LL_APR_RB))
+ if(LLFile::isfile(error_marker_file))
{
S32 marker_code = getMarkerErrorCode(error_marker_file);
if (marker_code >= 0)
@@ -4033,7 +4033,7 @@ void LLAppViewer::processMarkerFiles()
{
LL_INFOS("MarkerFile") << "Error marker '"<< error_marker_file << "' marker found, but versions did not match" << LL_ENDL;
}
- LLAPRFile::remove(error_marker_file);
+ LLFile::remove(error_marker_file);
}
#if LL_DARWIN
@@ -4060,7 +4060,7 @@ void LLAppViewer::removeMarkerFiles()
if (mMarkerFile.getFileHandle())
{
mMarkerFile.close() ;
- LLAPRFile::remove( mMarkerFileName );
+ LLFile::remove( mMarkerFileName );
LL_DEBUGS("MarkerFile") << "removed exec marker '"<<mMarkerFileName<<"'"<< LL_ENDL;
}
else
@@ -4071,7 +4071,7 @@ void LLAppViewer::removeMarkerFiles()
if (mLogoutMarkerFile.getFileHandle())
{
mLogoutMarkerFile.close();
- LLAPRFile::remove( mLogoutMarkerFileName );
+ LLFile::remove( mLogoutMarkerFileName );
LL_DEBUGS("MarkerFile") << "removed logout marker '"<<mLogoutMarkerFileName<<"'"<< LL_ENDL;
}
else
@@ -5439,7 +5439,7 @@ void LLAppViewer::createErrorMarker(eLastExecEvent error_code) const
bool LLAppViewer::errorMarkerExists() const
{
std::string error_marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ERROR_MARKER_FILE_NAME);
- return LLAPRFile::isExist(error_marker_file, NULL, LL_APR_RB);
+ return LLFile::isfile(error_marker_file);
}
void LLAppViewer::outOfMemorySoftQuit()