From: H.G. Muller Date: Sun, 2 Mar 2014 19:45:57 +0000 (+0100) Subject: Also search indirection files in user's .xboard tree X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=60d1791e93b0e2267615ec378f073d5f8564bd82;p=xboard.git Also search indirection files in user's .xboard tree --- 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) {