rem: var destFilePath = messenger.saveAttachmentToFolder(attachment.contentType, attachment.url, attachment.displayName, attachment.uri, destDirectory); 
add: var destFilePath = messenger.saveAttachmentToFolder(attachment.contentType, attachment.url, encodeURIComponent(attachment.displayName), attachment.uri, destDirectory); 
context:   getFlavorData : function(aTransferable, aFlavor, aData, aDataLen)  {    // get the url for the attachment    if (aFlavor == "application/x-moz-file-promise")    {      var urlPrimitive = { };      var dataSize = { };      aTransferable.getTransferData("application/x-moz-file-promise-url", urlPrimitive, dataSize);      var srcUrlPrimitive = urlPrimitive.value.QueryInterface(Components.interfaces.nsISupportsString);      // now get the destination file location from kFilePromiseDirectoryMime      var dirPrimitive = {};      aTransferable.getTransferData("application/x-moz-file-promise-dir", dirPrimitive, dataSize);      var destDirectory = dirPrimitive.value.QueryInterface(Components.interfaces.nsILocalFile);      // now save the attachment to the specified location      // XXX: we need more information than just the attachment url to save it, fortunately, we have an array      // of all the current attachments so we can cheat and scan through them      var attachment = null;      for (index in currentAttachments)      {        attachment = currentAttachments[index];        if (attachment.url == srcUrlPrimitive)          break;      }      // call our code for saving attachments      if (attachment)      {        var destFilePath = messenger.saveAttachmentToFolder(attachment.contentType, attachment.url, attachment.displayName, attachment.uri, destDirectory);        aData.value = destFilePath.QueryInterface(Components.interfaces.nsISupports);        aDataLen.value = 4;      }    }  }
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/e5b0daeda46fa0dca7a3398fc13e350f77a8662b/msgHdrViewOverlay.js/clean/mail/base/content/msgHdrViewOverlay.js