diff options
author | Brad Linden <brad@lindenlab.com> | 2023-02-02 12:11:40 -0800 |
---|---|---|
committer | Brad Linden <brad@lindenlab.com> | 2023-02-02 12:11:40 -0800 |
commit | 5fabfa50d7135d29c0cb8a553006cf9038f9baae (patch) | |
tree | 1d0f21551bd443d4e1ba187480c082d612dfaac5 /indra/llfilesystem/lldir_mac.cpp | |
parent | 627e3d51c61778e07e350689ce68ede24afe61ab (diff) | |
parent | 8d21d29bd7fa038db632ff90fb0e1207d0713ca2 (diff) |
Merge remote-tracking branch 'origin/main' into DRTVWR-559
Diffstat (limited to 'indra/llfilesystem/lldir_mac.cpp')
-rw-r--r-- | indra/llfilesystem/lldir_mac.cpp | 32 |
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(); |