diff options
author | Go MAEDA <maeda@farend.jp> | 2020-04-02 05:52:39 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2020-04-02 05:52:39 +0000 |
commit | fd75ebcd12cb39f14b16dc7e98df4f39969bc885 (patch) | |
tree | 4351869da445f17e5ad969329e26689636e41ed2 | |
parent | 1cade452eb9013a610a3363ea2679c8ec6724851 (diff) | |
download | redmine-fd75ebcd12cb39f14b16dc7e98df4f39969bc885.tar.gz redmine-fd75ebcd12cb39f14b16dc7e98df4f39969bc885.zip |
Replace File#readable? with Attachment#readable? (#7056).
git-svn-id: http://svn.redmine.org/redmine/trunk@19635 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/controllers/attachments_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index a41476f80..b69dcf983 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -237,7 +237,7 @@ class AttachmentsController < ApplicationController end def find_downloadable_attachments - @attachments = @container.attachments.select{|a| File.readable?(a.diskfile) } + @attachments = @container.attachments.select(&:readable?) bulk_download_max_size = Setting.bulk_download_max_size.to_i.kilobytes if @attachments.sum(&:filesize) > bulk_download_max_size flash[:error] = l(:error_bulk_download_size_too_big, |