mirror of
https://github.com/redmine/redmine.git
synced 2025-12-17 05:50:29 +01:00
Replace File#readable? with Attachment#readable? (#7056).
git-svn-id: http://svn.redmine.org/redmine/trunk@19635 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -237,7 +237,7 @@ class AttachmentsController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def find_downloadable_attachments
|
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
|
bulk_download_max_size = Setting.bulk_download_max_size.to_i.kilobytes
|
||||||
if @attachments.sum(&:filesize) > bulk_download_max_size
|
if @attachments.sum(&:filesize) > bulk_download_max_size
|
||||||
flash[:error] = l(:error_bulk_download_size_too_big,
|
flash[:error] = l(:error_bulk_download_size_too_big,
|
||||||
|
|||||||
Reference in New Issue
Block a user