summaryrefslogtreecommitdiffstats
path: root/app/models/attachment.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-10-05 11:37:57 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-10-05 11:37:57 +0000
commitcfc65d939781a20e755318cb2b4599525e5c1610 (patch)
tree773a454d43879daa78b5587754457892663c5eba /app/models/attachment.rb
parent1b63553dd4018911d0d30dd458031c702bed22cd (diff)
downloadredmine-cfc65d939781a20e755318cb2b4599525e5c1610.tar.gz
redmine-cfc65d939781a20e755318cb2b4599525e5c1610.zip
NoMethodError when uploading a file without logger (#14977).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12202 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/attachment.rb')
-rw-r--r--app/models/attachment.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/attachment.rb b/app/models/attachment.rb
index dd1aa3a7c..b289b0f47 100644
--- a/app/models/attachment.rb
+++ b/app/models/attachment.rb
@@ -102,7 +102,7 @@ class Attachment < ActiveRecord::Base
if @temp_file && (@temp_file.size > 0)
self.disk_directory = target_directory
self.disk_filename = Attachment.disk_filename(filename, disk_directory)
- logger.info("Saving attachment '#{self.diskfile}' (#{@temp_file.size} bytes)")
+ logger.info("Saving attachment '#{self.diskfile}' (#{@temp_file.size} bytes)") if logger
path = File.dirname(diskfile)
unless File.directory?(path)
FileUtils.mkdir_p(path)