Bug 683093 - Drag Attachments to a Finder-Window isnt working. r=squib
authorMark Banner <bugzilla@standard8.plus.com>
Wed, 12 Oct 2011 09:42:29 +0100
changeset 8634 c24fbeb1f0d4d25a80a62abf5118ff1365fcf914
parent 8633 57183fd2f0757eaa283a62a073bfacd8819787e4
child 8635 61eba1c8e780988bf72a419c5e5fb56428a9ef2f
push id6642
push userbugzilla@standard8.plus.com
push dateWed, 12 Oct 2011 08:44:59 +0000
treeherdercomm-central@61eba1c8e780 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssquib
bugs683093
Bug 683093 - Drag Attachments to a Finder-Window isnt working. r=squib
mail/base/content/mailCore.js
--- a/mail/base/content/mailCore.js
+++ b/mail/base/content/mailCore.js
@@ -681,15 +681,16 @@ nsFlavorDataProvider.prototype =
         attachment = currentAttachments[index];
         if (attachment.url == srcUrlPrimitive)
           break;
       }
 
       // call our code for saving attachments
       if (attachment)
       {
-        var destFilePath = messenger.saveAttachmentToFolder(attachment.contentType, attachment.url, encodeURIComponent(attachment.displayName), attachment.uri, destDirectory);
+        var name = attachment.name || attachment.displayName;
+        var destFilePath = messenger.saveAttachmentToFolder(attachment.contentType, attachment.url, encodeURIComponent(name), attachment.uri, destDirectory);
         aData.value = destFilePath.QueryInterface(Components.interfaces.nsISupports);
         aDataLen.value = 4;
       }
     }
   }
 }