1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-25 18:01:14 +00:00

Replace File#readable? with Attachment#readable? (#7056).

git-svn-id: http://svn.redmine.org/redmine/trunk@19631 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA 2020-04-01 09:14:16 +00:00
parent dfc498f44b
commit 0a80c4c14b

View 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