rem: currentAttachment = ""; 
add: var currentAttachment = ""; 
context: function AttachFile(){//  dump("AttachFile()\n");  currentAttachment = "";  //Get file using nsIFilePicker and convert to URL    try {      var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker);      fp.init(window, gComposeMsgsBundle.getString("chooseFileToAttach"), nsIFilePicker.modeOpen);      fp.appendFilters(nsIFilePicker.filterAll);      if (fp.show() == nsIFilePicker.returnOK) {      currentAttachment = fp.fileURL.spec;      dump("nsIFilePicker - "+currentAttachment+"\n");      }    }  catch (ex) {    dump("failed to get the local file to attach\n");  }  if (currentAttachment == "")    return;  if (!(DuplicateFileCheck(currentAttachment)))  {    var attachment = Components.classes["@mozilla.org/messengercompose/attachment;1"].createInstance(Components.interfaces.nsIMsgAttachment);    attachment.url = currentAttachment;    AddAttachment(attachment);  }  else  {    dump("###ERROR ADDING DUPLICATE FILE \n");    var errorTitle = gComposeMsgsBundle.getString("DuplicateFileErrorDlogTitle");    var errorMsg = gComposeMsgsBundle.getString("DuplicateFileErrorDlogMessage");    if (!gPromptService) {      gPromptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService();      gPromptService = gPromptService.QueryInterface(Components.interfaces.nsIPromptService);    }    if (gPromptService)      gPromptService.alert(window, errorTitle, errorMsg);    else      window.alert(errorMsg);  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/6d52592e83bce2a07c0c6646de9e9c15df155849/MsgComposeCommands.js/buggy/mailnews/compose/resources/content/MsgComposeCommands.js