Merged r12202 (#14977).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.3-stable@12214 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
daf2d54f27
commit
75e90593e0
|
@ -102,7 +102,7 @@ class Attachment < ActiveRecord::Base
|
||||||
if @temp_file && (@temp_file.size > 0)
|
if @temp_file && (@temp_file.size > 0)
|
||||||
self.disk_directory = target_directory
|
self.disk_directory = target_directory
|
||||||
self.disk_filename = Attachment.disk_filename(filename, disk_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)
|
path = File.dirname(diskfile)
|
||||||
unless File.directory?(path)
|
unless File.directory?(path)
|
||||||
FileUtils.mkdir_p(path)
|
FileUtils.mkdir_p(path)
|
||||||
|
|
Loading…
Reference in New Issue