Bug 689950 - RSS attachments can't be downloaded. r+a=Standard8
authorJim Porter <squibblyflabbetydoo@gmail.com>
Wed, 12 Oct 2011 10:28:52 +0100
changeset 9280 c2f9f8ee398bb2a7930fea87ca3f409ff4eff44e
parent 9279 98b40acdbdead0064986a9e70433967ed5706d6e
child 9281 2a43d7f6ab1c5edafedd248af95ed785fd6740fd
push id230
push userbugzilla@standard8.plus.com
push dateTue, 08 Nov 2011 22:55:24 +0000
treeherdercomm-beta@63dad5648415 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs689950
Bug 689950 - RSS attachments can't be downloaded. r+a=Standard8
mail/base/content/msgHdrViewOverlay.js
--- a/mail/base/content/msgHdrViewOverlay.js
+++ b/mail/base/content/msgHdrViewOverlay.js
@@ -1704,17 +1704,23 @@ AttachmentInfo.prototype = {
    * This method checks whether the attachment has an associated file or not.
    * Deleted attachments or detached attachments with missing external files
    * do *not* have a file.
    *
    * @return true if the attachment has an associated file, false otherwise
    */
   get hasFile()
   {
-    return !this.isDeleted && (!this.isExternalAttachment || this.size != null);
+    if (this.isDeleted)
+      return false;
+    if (this.isExternalAttachment && /^file:/.test(this.url) &&
+        this.size === null)
+      return false;
+
+    return true;
   },
 
   /**
    * This method checks whether the attachment is empty or not.
    *
    * @return true if the attachment is empty, false otherwise
    */
   get isEmpty()