diff --git a/app/models/dmsf_file.rb b/app/models/dmsf_file.rb index 01a7d530..59588fd7 100644 --- a/app/models/dmsf_file.rb +++ b/app/models/dmsf_file.rb @@ -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? diff --git a/app/models/dmsf_file_revision.rb b/app/models/dmsf_file_revision.rb index 5b5b8845..869d89ec 100644 --- a/app/models/dmsf_file_revision.rb +++ b/app/models/dmsf_file_revision.rb @@ -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)