Fix access to ~~/themes/conf for OS X
authorH.G. Muller <h.g.muller@hccnet.nl>
Tue, 14 Jan 2014 09:02:22 +0000 (10:02 +0100)
committerH.G. Muller <h.g.muller@hccnet.nl>
Tue, 14 Jan 2014 09:02:22 +0000 (10:02 +0100)
In OS X DATADIR is a variable.

args.h

diff --git a/args.h b/args.h
index d1463ec..d803e72 100644 (file)
--- 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