Merge with master

This commit is contained in:
Karel Picman 2018-03-13 13:27:03 +01:00
commit 9c2929c522
2 changed files with 3 additions and 3 deletions

View File

@ -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?

View File

@ -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)