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:
parent
6be315c1ff
commit
c87f36d20b
|
@ -128,7 +128,12 @@ private
|
|||
|
||||
# Checks that the file exists and is 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
|
||||
|
||||
def read_authorize
|
||||
|
|
Loading…
Reference in New Issue