rem: } else 
add: } else if (filePickerMode != nsIFilePicker.modeGetFolder) 
context: function onFileSelected(/* nsIArray */ selectedFileList) {  var validFileSelected = false;  var invalidSelection = false;  var file;  var fileCount = selectedFileList.length;  for (var index = 0; index < fileCount; ++index) {    file = selectedFileList.queryElementAt(index, nsIFile);    if (file) {      var path = file.leafName;      if (path) {        var isDir = file.isDirectory();        if ((filePickerMode == nsIFilePicker.modeGetFolder) || !isDir) {          if (!validFileSelected)            textInput.value = "";          addToTextFieldValue(path);        }        if (isDir && fileCount > 1) {          // The user has selected multiple items, and one of them is          // a directory.  This is not a valid state, so we'll disable          // the ok button.          invalidSelection = true;        }        validFileSelected = true;      }    }  }  if (validFileSelected) {    setOKAction(file);    okButton.disabled = invalidSelection;  } else    okButton.disabled = (textInput.value == "");}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/9d3c4cdf4e6367b453755924c52c10d788429d0f/filepicker.js/clean/toolkit/components/filepicker/content/filepicker.js