Log an error when trying to send an attachment that cannot be read.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11084 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-12-26 14:00:10 +00:00
parent 6be315c1ff
commit c87f36d20b
1 changed files with 6 additions and 1 deletions

View File

@ -128,7 +128,12 @@ private
# Checks that the file exists and is readable # Checks that the file exists and is readable
def file_readable def file_readable
@attachment.readable? ? true : render_404 if @attachment.readable?
true
else
logger.error "Cannot send attachment, #{@attachment.diskfile} does not exist or is unreadable."
render_404
end
end end
def read_authorize def read_authorize