rem: okButton.disabled = (textInput.value == ""); 
add:  if (validFileSelected) { var buttonLabel = getOKAction(file); okButton.setAttribute("label", buttonLabel); okButton.disabled = invalidSelection; } else okButton.disabled = (textInput.value == ""); 
context: function onFileSelected(file) {  if (file) {    var path = file.leafName;        if (path) {      if ((filePickerMode == nsIFilePicker.modeGetFolder) || !file.isDirectory())        textInput.value = path;            var buttonLabel = getOKAction(file);      okButton.setAttribute("label", buttonLabel);      okButton.disabled = false;      return;    }  }  okButton.disabled = (textInput.value == "");}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/72d11531a98c05182f7e0b93e89c5871fb7db820/filepicker.js/buggy/xpfe/components/filepicker/res/content/filepicker.js