rem: var mimeInfo = getMIMEInfoForType(aContentType); if (mimeInfo) { var extCount = { }; var extList = { }; mimeInfo.GetFileExtensions(extCount, extList);  const stdURLContractID = "@mozilla.org/network/standard-url;1"; const stdURLIID = Components.interfaces.nsIURI; var uri = Components.classes[stdURLContractID].createInstance(stdURLIID); var url = uri.QueryInterface(Components.interfaces.nsIURL); url.filePath = aFile;  if (aContentType == "text/html") { if ((url.fileExtension && url.fileExtension != "htm" && url.fileExtension != "html") || (!url.fileExtension)) return leafName + ".html"; }  if (!url.fileExtension) return leafName + "." + extList.value[0]; }  return leafName; 
add: return aFile; 
context: function getNormalizedLeafName(aFile, aContentType){  // Fix up the file name we're saving to so that if the user enters  // no extension, an appropriate one is appended.   var leafName = aFile;  var mimeInfo = getMIMEInfoForType(aContentType);  if (mimeInfo) {    var extCount = { };    var extList = { };    mimeInfo.GetFileExtensions(extCount, extList);    const stdURLContractID = "@mozilla.org/network/standard-url;1";    const stdURLIID = Components.interfaces.nsIURI;    var uri = Components.classes[stdURLContractID].createInstance(stdURLIID);    var url = uri.QueryInterface(Components.interfaces.nsIURL);     url.filePath = aFile;        if (aContentType == "text/html") {      if ((url.fileExtension &&            url.fileExtension != "htm" && url.fileExtension != "html") ||          (!url.fileExtension))        return leafName + ".html";    }    if (!url.fileExtension)      return leafName + "." + extList.value[0];  }   return leafName;}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/9115bf562b6e05c165c86a0bc0d599bd398a927a/contentAreaUtils.js/buggy/suite/common/contentAreaUtils.js