Browse Source

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


git-svn-id: http://svn.redmine.org/redmine/trunk@19635 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/4.2.0
Go MAEDA 4 years ago
parent
commit
fd75ebcd12
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      app/controllers/attachments_controller.rb

+ 1
- 1
app/controllers/attachments_controller.rb View File

@@ -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,

Loading…
Cancel
Save