Merge with master
This commit is contained in:
commit
9c2929c522
@ -96,9 +96,9 @@ class DmsfFile < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.storage_path
|
def self.storage_path
|
||||||
path = Setting.plugin_redmine_dmsf['dmsf_storage_directory'].strip
|
path = Setting.plugin_redmine_dmsf['dmsf_storage_directory'].try(:strip)
|
||||||
if path.blank?
|
if path.blank?
|
||||||
path = Pathname.new('files').join('dmsf')
|
path = Pathname.new('files').join('dmsf').to_s
|
||||||
else
|
else
|
||||||
pn = Pathname.new(path)
|
pn = Pathname.new(path)
|
||||||
return pn if pn.absolute?
|
return pn if pn.absolute?
|
||||||
|
|||||||
@ -160,7 +160,7 @@ class DmsfFileRevision < ActiveRecord::Base
|
|||||||
path = self.storage_base_path
|
path = self.storage_base_path
|
||||||
begin
|
begin
|
||||||
FileUtils.mkdir_p(path) unless File.exist?(path)
|
FileUtils.mkdir_p(path) unless File.exist?(path)
|
||||||
rescue Exception => e
|
rescue StandardError => e
|
||||||
Rails.logger.error e.message
|
Rails.logger.error e.message
|
||||||
end
|
end
|
||||||
filename = path.join(self.disk_filename)
|
filename = path.join(self.disk_filename)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user