From: H.G. Muller Date: Fri, 12 Oct 2012 10:04:17 +0000 (+0200) Subject: Fix browsing for path X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=d8aced6771c13f291427bba8711c76184697ea28;p=xboard.git Fix browsing for path A pathname was still prefixed with the cuurent directory. --- diff --git a/dialogs.c b/dialogs.c index fdf2d57..d142751 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;