summaryrefslogtreecommitdiff
path: root/indra/llcommon/llerror.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-12-11 01:42:52 +0200
committerGitHub <noreply@github.com>2025-12-11 01:42:52 +0200
commitc92b0b74cbd963cd79d1cb7754256b801f1479b1 (patch)
tree5f3cf34559856bdafd950acf0c9a4d6dec59f0bc /indra/llcommon/llerror.cpp
parentdbbce566e7d66c907dde7bd6c4212b0954b9a5e1 (diff)
Revert #4899 "Add more functionality to LLFile and cleanup LLAPRFile"
Interferes with linux work, will be moved to a different branch and applied separately.
Diffstat (limited to 'indra/llcommon/llerror.cpp')
-rw-r--r--[-rwxr-xr-x]indra/llcommon/llerror.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index bfa8bca224..b14464382b 100755..100644
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -435,9 +435,13 @@ namespace
std::string file = user_dir + "/logcontrol-dev.xml";
- if (!LLFile::isfile(file))
- {
- file = app_dir + "/logcontrol.xml";
+ llstat stat_info;
+ if (LLFile::stat(file, &stat_info)) {
+ // NB: stat returns non-zero if it can't read the file, for example
+ // if it doesn't exist. LLFile has no better abstraction for
+ // testing for file existence.
+
+ file = app_dir + "/logcontrol.xml";
}
return * new LogControlFile(file);
// NB: This instance is never freed