You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2018/10/21 14:41:04 UTC
[whimsy] branch master updated: Trim trailing >;
only trim if <> enclose the name
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new 51cc04d Trim trailing >; only trim if <> enclose the name
51cc04d is described below
commit 51cc04dbc2ac85072d2f78b0f90faa68398d0173
Author: Sebb <se...@apache.org>
AuthorDate: Sun Oct 21 15:40:25 2018 +0100
Trim trailing >; only trim if <> enclose the name
---
www/secretary/workbench/models/message.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/www/secretary/workbench/models/message.rb b/www/secretary/workbench/models/message.rb
index d61fcb2..cf94995 100644
--- a/www/secretary/workbench/models/message.rb
+++ b/www/secretary/workbench/models/message.rb
@@ -27,7 +27,7 @@ class Message
# find an attachment
#
def find(name)
- name = name[1...-1] if name =~ /<.*>/
+ name = name[1...-2] if name =~ /^<.*>$/ # drop enclosing <> if present
name = name[2..-1] if name.start_with? './'
name = name.dup.force_encoding('utf-8')