From 0a80c4c14b6a6cd339fa1bfcb5de4715619bef04 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Wed, 1 Apr 2020 09:14:16 +0000 Subject: [PATCH] Replace File#readable? with Attachment#readable? (#7056). git-svn-id: http://svn.redmine.org/redmine/trunk@19631 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/attachment.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.5