]> source.dussan.org Git - redmine.git/commitdiff
Replace File#readable? with Attachment#readable? (#7056).
authorGo MAEDA <maeda@farend.jp>
Wed, 1 Apr 2020 09:14:16 +0000 (09:14 +0000)
committerGo MAEDA <maeda@farend.jp>
Wed, 1 Apr 2020 09:14:16 +0000 (09:14 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@19631 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/attachment.rb

index a89a0c37eff630ad49dd7160bd01465b2f763af1..b5a3332ac016cd45740254b1eef401dfd4e07578 100644 (file)
@@ -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