rem: outlinerView.setDirectory(directory); 
add: try { outlinerView.setDirectory(directory); } catch(ex) { var errorTitle = gFilePickerBundle.getString("noPermissionTitle"); var errorMsg = gFilePickerBundle.getString("noPermissionError"); var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] .getService(Components.interfaces.nsIPromptService); promptService.alert(window, errorTitle, errorMsg); return; }  
context: function gotoDirectory(directory) {  addToHistory(directory.unicodePath);  window.setCursor("wait");  outlinerView.setDirectory(directory);  window.setCursor("auto");  outlinerView.QueryInterface(nsIOutlinerView).selection.clearSelection();  textInput.focus();  sfile = directory;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/997efa9822a5ebb65da78f3c142fb70d6d13b1a0/filepicker.js/clean/xpfe/components/filepicker/res/content/filepicker.js