diff --git a/rtgui/options.cc b/rtgui/options.cc index 31b816a19..5b908d499 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -2272,15 +2272,15 @@ void Options::load(bool lightweight) #ifdef __APPLE__ // Build Application Support directory path for macOS. - const gchar* homedir = g_getenv("HOME"); // This returns the current container data dir in ~/Library - const gchar* configdir = "/Application Support/RawTherapee/config"; - gchar* homebuf = g_strnfill(789, 'a'); - gsize homelength = strlen(homedir); - g_stpcpy(homebuf, homedir); + 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}; + int homelength = strlen(homebuf.c_str()); homebuf[homelength-45] = '\0'; - configdir = "/Application Support/RawTherapee/config"; // Back out of containers and into App. Support - const gchar* pathconcat = g_strconcat(homebuf, configdir); - path = pathconcat; + configdir = "/Application Support/RawTherapee/config"; + std::string configpath = homebuf + configdir; + path = configpath.c_str(); + std::cout<