From 60d1791e93b0e2267615ec378f073d5f8564bd82 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sun, 2 Mar 2014 20:45:57 +0100 Subject: [PATCH] Also search indirection files in user's .xboard tree --- args.h | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/args.h b/args.h index 29308b5..f52404f 100644 --- a/args.h +++ b/args.h @@ -913,11 +913,16 @@ ParseSettingsFile(char *name, char **addr) if (ok) { f = fopen(fullname, "r"); #ifdef DATADIR - if(f == NULL && *fullname != '/') { // when a relative name did not work + if(f == NULL && *fullname != '/' && !addr) { // when a relative name did not work char buf[MSG_SIZ]; - snprintf(buf, MSG_SIZ, "%s/themes/conf", DATADIR); - MySearchPath(buf, name, fullname); // also look in standard place + snprintf(buf, MSG_SIZ, "~/.xboard/themes/conf/%s", name); + MySearchPath(installDir, buf, fullname); // first look in user's own files f = fopen(fullname, "r"); + if(f == NULL) { + snprintf(buf, MSG_SIZ, "%s/themes/conf", DATADIR); + MySearchPath(buf, name, fullname); // also look in standard place + f = fopen(fullname, "r"); + } } #endif if (f != NULL) { -- 1.7.0.4