From f07762a46830005b6ff4218c1f070ce27a9ecebe Mon Sep 17 00:00:00 2001 From: Frederick Martian Date: Wed, 12 Nov 2025 19:19:59 +0100 Subject: Refactoring of LLFile class to support additional methods - LLFile with its own class method interface to access files for read and write - Remove rudimentary LLUniqueFile class as LLFile supports now all of that and more - Implement most of the filename based functions using std::filesystem functions - Replace LLFile::rmdir() with LLFile::remove() since this function now supports deleting files and directories on all platforms. --- indra/llcommon/llerror.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) mode change 100644 => 100755 indra/llcommon/llerror.cpp (limited to 'indra/llcommon/llerror.cpp') diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp old mode 100644 new mode 100755 index b14464382b..bfa8bca224 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -435,13 +435,9 @@ namespace std::string file = user_dir + "/logcontrol-dev.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"; + if (!LLFile::isfile(file)) + { + file = app_dir + "/logcontrol.xml"; } return * new LogControlFile(file); // NB: This instance is never freed -- cgit v1.3