diff --git a/Source/exehead/Ui.c b/Source/exehead/Ui.c index 1cb2094f..75cee518 100644 --- a/Source/exehead/Ui.c +++ b/Source/exehead/Ui.c @@ -737,7 +737,9 @@ static BOOL CALLBACK DirProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar ShowWindow(h,SW_SHOWNA); } #endif - SetUITextNT(IDC_DIR,addtrailingslash(dir)); + if (validpathspec(dir) && !skip_root(dir)) + addtrailingslash(dir); + SetUITextNT(IDC_DIR,dir); SetUITextFromLang(IDC_BROWSE,this_page->parms[2]); SetUITextFromLang(IDC_SELDIRTEXT,this_page->parms[1]); }