rem: var file = '';  file = encodeURI('file: doXPIInstall(file, getName(file)); 
add: var ioService = Components.classes['@mozilla.org/network/io-service;1'].getService(nsIIOService); var fileProtocolHandler = ioService.getProtocolHandler("file").QueryInterface(nsIFileProtocolHandler); var url = fileProtocolHandler.newFileURI(fp.file).QueryInterface(nsIURL); var xpi = {}; xpi[decodeURIComponent(url.fileBaseName)] = url.spec; InstallTrigger.install(xpi); 
context: function installExtension(){  // 1) Prompt the user for the location of the theme to install. Eventually we'll support web locations too.  var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker);  fp.init(window, document.getElementById("installExtensions").getAttribute("filepickertitle"), nsIFilePicker.modeOpen);  fp.appendFilters(nsIFilePicker.filterAll);  var ret = fp.show();  if (ret == nsIFilePicker.returnOK)   {    var file = '';    // XXX To fix : see bugzilla 225695 comment #43    file = encodeURI('file:///' + fp.file.path.replace(/\\/g,'/'));    doXPIInstall(file, getName(file));  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/a09346d5bd3d832f7df97aed61b09ae5db68a7a1/pref-extensions.js/buggy/mail/components/prefwindow/content/pref-extensions.js