summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2018-01-07 21:47:48 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2018-01-07 21:47:48 +0000
commit19fdcd7a1faafb8ed8244ec7b147fd572748a984 (patch)
treeb7f9046216bdf4c6b6836e5438e7b0a5c8c05263 /app
parente8bc1dbaa80dd714254da9c19e4ffaae4fbf9736 (diff)
downloadredmine-19fdcd7a1faafb8ed8244ec7b147fd572748a984.tar.gz
redmine-19fdcd7a1faafb8ed8244ec7b147fd572748a984.zip
Merged r17147 to 3.4-stable (#27885).
git-svn-id: http://svn.redmine.org/redmine/branches/3.4-stable@17148 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rwxr-xr-xapp/models/mail_handler.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb
index 9bcc1b12d..518e8c84b 100755
--- a/app/models/mail_handler.rb
+++ b/app/models/mail_handler.rb
@@ -296,6 +296,7 @@ class MailHandler < ActionMailer::Base
if email.attachments && email.attachments.any?
email.attachments.each do |attachment|
next unless accept_attachment?(attachment)
+ next unless attachment.body.decoded.size > 0
obj.attachments << Attachment.create(:container => obj,
:file => attachment.body.decoded,
:filename => attachment.filename,