summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-10-13 08:28:26 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-10-13 08:28:26 +0000
commit75e90593e03d90463269e0f89110e44b2300c41e (patch)
tree8b434e44bb9311198ea858df4925e1bf977670a6
parentdaf2d54f27bea153c35fe822a327f797cc43782d (diff)
downloadredmine-75e90593e03d90463269e0f89110e44b2300c41e.tar.gz
redmine-75e90593e03d90463269e0f89110e44b2300c41e.zip
Merged r12202 (#14977).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.3-stable@12214 e93f8b46-1217-0410-a6f0-8f06a7374b81
-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 eeab56242..35d5286fa 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)