summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2020-04-01 09:14:16 +0000
committerGo MAEDA <maeda@farend.jp>2020-04-01 09:14:16 +0000
commit0a80c4c14b6a6cd339fa1bfcb5de4715619bef04 (patch)
tree961dc989c2a9532ba359f7a8b09e6f147b9cd1ea /app
parentdfc498f44b82da6ae788fddd77906ff6f4e980b0 (diff)
downloadredmine-0a80c4c14b6a6cd339fa1bfcb5de4715619bef04.tar.gz
redmine-0a80c4c14b6a6cd339fa1bfcb5de4715619bef04.zip
Replace File#readable? with Attachment#readable? (#7056).
git-svn-id: http://svn.redmine.org/redmine/trunk@19631 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/attachment.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/attachment.rb b/app/models/attachment.rb
index a89a0c37e..b5a3332ac 100644
--- a/app/models/attachment.rb
+++ b/app/models/attachment.rb
@@ -347,7 +347,7 @@ class Attachment < ActiveRecord::Base
end
def self.archive_attachments(out_file, attachments)
- attachments = attachments.select{|attachment| File.readable?(attachment.diskfile) }
+ attachments = attachments.select(&:readable?)
return nil if attachments.blank?
Zip.unicode_names = true