From: H.G. Muller Date: Fri, 12 Oct 2012 10:04:17 +0000 (+0200) Subject: Fix browsing for path X-Git-Url: http://hgm.nubati.net/cgi-bin/gitweb.cgi?p=xboard.git;a=commitdiff_plain;h=d8aced6771c13f291427bba8711c76184697ea28 Fix browsing for path A pathname was still prefixed with the cuurent directory. --- diff --git a/dialogs.c b/dialogs.c index fdf2d572..d1427514 100644 --- a/dialogs.c +++ b/dialogs.c @@ -2295,7 +2295,10 @@ BrowseOK (int n) } if(!fileName[0]) return FALSE; // refuse OK when no file if(!savMode[0]) { // browsing for name only (dialog Browse button) - snprintf(title, MSG_SIZ, "%s/%s", curDir, fileName); + if(fileName[0] == '/') // We already had a path name + snprintf(title, MSG_SIZ, "%s", fileName); + else + snprintf(title, MSG_SIZ, "%s/%s", curDir, fileName); SetWidgetText((Option*) savFP, title, TransientDlg); currentCps = savCps; // could return to Engine Settings dialog! return TRUE;