From 12ea3db9cb05ec27ad96fd57ec02f56c8c2e97d3 Mon Sep 17 00:00:00 2001 From: Richard Barber Date: Sun, 16 Feb 2020 22:36:17 -0800 Subject: [PATCH] mac:build pathname in options.cc --- rtgui/options.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/rtgui/options.cc b/rtgui/options.cc index fe19bf42e..7bcf0b466 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -2271,7 +2271,16 @@ void Options::load(bool lightweight) Glib::ustring dPath; #ifdef __APPLE__ - path = g_getenv("HOME") + "Library/Application Support/RawTherapee/config"; + const gchar* homedir; + const gchar* configdir; + homedir = g_getenv("HOME"); + configdir = "Library/Application Support/RawTherapee/config"; + int bufferSize = strlen(homedir) + strlen(configdir) + 1; + gchar* concatString = new gchar[ bufferSize ]; + strcpy( concatString, homedir ); + strcat( concatString, configdir ); + path = concatString; + delete[] concatString; #else path = g_getenv("RT_SETTINGS"); #endif