rem: col = WMGetBrowserNumberOfColumns(panel->browser) - 1;
add: if (file[0] != '\0') haveFile = 1; free(file);  col = WMGetBrowserSelectedColumn(panel->browser);
context: validOpenFile(WMFilePanel *panel){    WMListItem *item;    int col;    /*col = WMGetBrowserSelectedColumn(panel->browser);*/    col = WMGetBrowserNumberOfColumns(panel->browser) - 1;    item = WMGetBrowserSelectedItemInColumn(panel->browser, col);    if (item) {	if (item->isBranch && !panel->flags.canChooseDirectories)	    return False;	else if (!item->isBranch && !panel->flags.canChooseFiles)            return False;        else            return True;    }    if (!panel->flags.canChooseDirectories)        return False;    else        return True;}