summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/attachments_controller.rb2
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,