From: H.G. Muller Date: Tue, 14 Jan 2014 09:02:22 +0000 (+0100) Subject: Fix access to ~~/themes/conf for OS X X-Git-Url: http://winboard.nl/cgi-bin?p=xboard.git;a=commitdiff_plain;h=06a5ddd9c1da72e5826fc8562762b7a1a4e6f011 Fix access to ~~/themes/conf for OS X In OS X DATADIR is a variable. --- diff --git a/args.h b/args.h index d1463ec..d803e72 100644 --- a/args.h +++ b/args.h @@ -911,7 +911,9 @@ ParseSettingsFile(char *name, char **addr) f = fopen(fullname, "r"); #ifdef DATADIR if(f == NULL && *fullname != '/') { // when a relative name did not work - MySearchPath(DATADIR "/themes/conf", name, fullname); // also look in standard place + char buf[MSG_SIZ]; + snprintf(buf, MSG_SIZ, "%s/themes/conf", DATADIR); + MySearchPath(buf, name, fullname); // also look in standard place f = fopen(fullname, "r"); } #endif