From: H.G. Muller Date: Tue, 13 Mar 2012 20:25:22 +0000 (+0100) Subject: Install engines as ./exefile in XBoard X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=95772c234f0afaf88ef01854868c93ff2e8a20fb;p=xboard.git Install engines as ./exefile in XBoard When a path name is split into directory and filename, the latter in Linux must be preceded by ./ in order to make it executable in the directory XBoard starts it in. --- diff --git a/backend.c b/backend.c index 5696701..b1d35a9 100644 --- a/backend.c +++ b/backend.c @@ -920,6 +920,7 @@ Load (ChessProgramState *cps, int i) p[-1] = 0; appData.directory[i] = strdup(engineName); p[-1] = SLASH; + if(SLASH == '/' && p - engineName > 1) *(p -= 2) = '.'; // for XBoard use ./exeName as command after split! } else appData.directory[i] = "."; if(params[0]) { if(strchr(p, ' ') && !strchr(p, '"')) snprintf(buf2, MSG_SIZ, "\"%s\"", p), p = buf2; // quote if it contains spaces