rem: textInput = document.getElementById("textInput"); textInput.value = file.path; 
add: if (!file.isDirectory()) { textInput = document.getElementById("textInput"); textInput.value = file.leafName; lastClicked = file.leafName; } 
context: function onClick(e) {  var file = Components.classes[nsILocalFile_PROGID].createInstance(nsILocalFile);  file.initWithPath(e.target.parentNode.getAttribute("path"));  textInput = document.getElementById("textInput");  textInput.value = file.path;  if (e.detail == 2) {    if (file.isDirectory()) {      gotoDirectory(file.path);    }    else if (file.isFile()) {	/* what about symlinks? what if they symlink to a directory? */ 	return doOKButton();    }  }}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/c4ecf7997b73a8bb54b993e9119239afc1c33134/filepicker.js/buggy/xpfe/components/filepicker/res/content/filepicker.js