mac: use fewer variables
This commit is contained in:
@@ -2273,12 +2273,10 @@ void Options::load(bool lightweight)
|
|||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
// Build Application Support directory path for macOS.
|
// Build Application Support directory path for macOS.
|
||||||
const char* homedir = g_getenv("HOME"); // This returns the current container data dir in ~/Library
|
const char* homedir = g_getenv("HOME"); // This returns the current container data dir in ~/Library
|
||||||
std::string configdir = "/Application Support/RawTherapee/config";
|
|
||||||
std::string homebuf{homedir};
|
std::string homebuf{homedir};
|
||||||
int homelength = strlen(homebuf.c_str());
|
int homelength = strlen(homebuf.c_str());
|
||||||
homebuf[homelength-45] = '\0';
|
homebuf[homelength-44] = '\0';
|
||||||
configdir = "/Application Support/RawTherapee/config";
|
std::string configpath = homebuf + "/Application Support/RawTherapee/config";
|
||||||
std::string configpath = homebuf + configdir;
|
|
||||||
path = configpath.c_str();
|
path = configpath.c_str();
|
||||||
std::cout<<path<<std::endl;
|
std::cout<<path<<std::endl;
|
||||||
#else
|
#else
|
||||||
@@ -2328,9 +2326,7 @@ void Options::load(bool lightweight)
|
|||||||
|
|
||||||
// Modify the path of the cache folder to the one provided in RT_CACHE environment variable. Build the cache folder name in macOS.
|
// Modify the path of the cache folder to the one provided in RT_CACHE environment variable. Build the cache folder name in macOS.
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
const char* cachedir;
|
std::string cachepath = homebuf + "/Application Support/RawTherapee/cache";
|
||||||
cachedir = "/Application Support/RawTherapee/cache"; // Back out of containers and into App. Support
|
|
||||||
std::string cachepath = homebuf + cachedir;
|
|
||||||
path = cachepath.c_str();
|
path = cachepath.c_str();
|
||||||
std::cout<<path<<std::endl;
|
std::cout<<path<<std::endl;
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user