summaryrefslogtreecommitdiff
path: root/indra/llfilesystem/lldir_mac.cpp
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2023-02-03 01:46:01 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2023-02-03 01:46:01 +0200
commite7ba1753d203a6a8ff3ac42f484603535dd7bfd3 (patch)
tree4a35a769e162f6308b3f748521a6f68b44de9709 /indra/llfilesystem/lldir_mac.cpp
parent788ba76bdf5dcc0a018a6b53bc1cc8f359e85f34 (diff)
parent8d21d29bd7fa038db632ff90fb0e1207d0713ca2 (diff)
Merge branch 'main' into DRTVWR-539
# Conflicts: # doc/contributions.txt # indra/cmake/Copy3rdPartyLibs.cmake # indra/cmake/FindOpenJPEG.cmake # indra/cmake/OpenJPEG.cmake # indra/integration_tests/llui_libtest/CMakeLists.txt # indra/newview/CMakeLists.txt
Diffstat (limited to 'indra/llfilesystem/lldir_mac.cpp')
-rw-r--r--indra/llfilesystem/lldir_mac.cpp32
1 files changed, 14 insertions, 18 deletions
diff --git a/indra/llfilesystem/lldir_mac.cpp b/indra/llfilesystem/lldir_mac.cpp
index 3bc4ee844e..9ad8e274b6 100644
--- a/indra/llfilesystem/lldir_mac.cpp
+++ b/indra/llfilesystem/lldir_mac.cpp
@@ -66,16 +66,16 @@ LLDir_Mac::LLDir_Mac()
const std::string secondLifeString = "SecondLife";
- std::string *executablepathstr = getSystemExecutableFolder();
+ std::string executablepathstr = getSystemExecutableFolder();
//NOTE: LLINFOS/LLERRS will not output to log here. The streams are not initialized.
- if (executablepathstr)
+ if (!executablepathstr.empty())
{
// mExecutablePathAndName
- mExecutablePathAndName = *executablepathstr;
+ mExecutablePathAndName = executablepathstr;
- boost::filesystem::path executablepath(*executablepathstr);
+ boost::filesystem::path executablepath(executablepathstr);
# ifndef BOOST_SYSTEM_NO_DEPRECATED
#endif
@@ -83,8 +83,8 @@ LLDir_Mac::LLDir_Mac()
mExecutableDir = executablepath.parent_path().string();
// mAppRODataDir
- std::string *resourcepath = getSystemResourceFolder();
- mAppRODataDir = *resourcepath;
+ std::string resourcepath = getSystemResourceFolder();
+ mAppRODataDir = resourcepath;
// *NOTE: When running in a dev tree, use the copy of
// skins in indra/newview/ rather than in the application bundle. This
@@ -110,11 +110,11 @@ LLDir_Mac::LLDir_Mac()
}
// mOSUserDir
- std::string *appdir = getSystemApplicationSupportFolder();
+ std::string appdir = getSystemApplicationSupportFolder();
std::string rootdir;
//Create root directory
- if (CreateDirectory(*appdir, secondLifeString, &rootdir))
+ if (CreateDirectory(appdir, secondLifeString, &rootdir))
{
// Save the full path to the folder
@@ -128,12 +128,10 @@ LLDir_Mac::LLDir_Mac()
}
//mOSCacheDir
- std::string *cachedir = getSystemCacheFolder();
-
- if (cachedir)
-
+ std::string cachedir = getSystemCacheFolder();
+ if (!cachedir.empty())
{
- mOSCacheDir = *cachedir;
+ mOSCacheDir = cachedir;
//TODO: This changes from ~/Library/Cache/Secondlife to ~/Library/Cache/com.app.secondlife/Secondlife. Last dir level could go away.
CreateDirectory(mOSCacheDir, secondLifeString, NULL);
}
@@ -143,12 +141,10 @@ LLDir_Mac::LLDir_Mac()
// mTempDir
//Aura 120920 boost::filesystem::temp_directory_path() not yet implemented on mac. :(
- std::string *tmpdir = getSystemTempFolder();
- if (tmpdir)
+ std::string tmpdir = getSystemTempFolder();
+ if (!tmpdir.empty())
{
-
- CreateDirectory(*tmpdir, secondLifeString, &mTempDir);
- if (tmpdir) delete tmpdir;
+ CreateDirectory(tmpdir, secondLifeString, &mTempDir);
}
mWorkingDir = getCurPath();