From 735651df559eabf0eface6bf31b049bc14d247d5 Mon Sep 17 00:00:00 2001 From: John D Pell Date: Sun, 8 Aug 2021 09:36:11 +0200 Subject: [PATCH] WMaker: Use wdefaultspathfordomain() to get path for Defaults directory Instead of constructing path to user's defaults directory with hard-coded names, just query wdefaultspathfordomain with a blank domain: this returns the equivalent of "~/GNUstep/Defaults/", yet avoiding problems related to duplicating strings. --- src/main.c | 2 +- src/wconfig.h.in | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index a00d9c7f..7b47b0d6 100644 --- a/src/main.c +++ b/src/main.c @@ -488,7 +488,7 @@ static void inotifyWatchConfig(void) " Changes to the defaults database will require" " a restart to take effect. Check your kernel!")); } else { - watchPath = wstrconcat(wusergnusteppath(), "/Defaults"); + watchPath = wdefaultspathfordomain(""); /* Add the watch; really we are only looking for modify events * but we might want more in the future so check all events for now. * The individual events are checked for in event.c. diff --git a/src/wconfig.h.in b/src/wconfig.h.in index 46c3059c..2c4900e9 100644 --- a/src/wconfig.h.in +++ b/src/wconfig.h.in @@ -122,7 +122,6 @@ /* name of the script to execute at startup */ #define DEF_INIT_SCRIPT "autostart" #define DEF_EXIT_SCRIPT "exitscript" -#define DEFAULTS_DIR "Defaults" #ifdef USE_TIFF #define DEF_BUTTON_IMAGES PKGDATADIR"/buttons.tiff" -- 2.11.4.GIT