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