whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Ruby <ru...@apache.org>
Subject [whimsy.git] [1/1] Commit bf29fd4: strip brackets in content ids for comparison
Date Thu, 07 Jan 2016 20:58:39 GMT
Commit bf29fd49a1b62d90d6479581c2d2a55912d065e9:
    strip brackets in content ids for comparison


Branch: refs/heads/master
Author: Sam Ruby <rubys@intertwingly.net>
Committer: Sam Ruby <rubys@intertwingly.net>
Pusher: rubys <rubys@apache.org>

------------------------------------------------------------
www/secmail/models/message.rb                                | ++ 
------------------------------------------------------------
2 changes: 2 additions, 0 deletions.
------------------------------------------------------------


diff --git a/www/secmail/models/message.rb b/www/secmail/models/message.rb
index 9b3ad54..4448067 100644
--- a/www/secmail/models/message.rb
+++ b/www/secmail/models/message.rb
@@ -10,6 +10,8 @@ def initialize(mailbox, hash, headers, email)
 
   # find an attachment
   def find(name)
+    name = name[1...-1] if name =~ /<.*>/
+
     headers = @headers[:attachments].find do |attach|
       attach[:name] == name or attach['Content-ID'].to_s == '<' + name + '>'
     end

Mime
View raw message