#249 Storage path for DMSF files ignores global storage path for attachments

This commit is contained in:
Karel Picman 2014-04-23 09:32:33 +02:00
parent 8f93301999
commit 635410d62c

View File

@ -72,7 +72,8 @@ class DmsfFile < ActiveRecord::Base
def self.storage_path
unless @@storage_path.present?
@@storage_path = Setting.plugin_redmine_dmsf['dmsf_storage_directory'].strip
@@storage_path = Setting.plugin_redmine_dmsf['dmsf_storage_directory'].strip
@@storage_path = Pathname(Redmine::Configuration['attachments_storage_path']).join('dmsf') if @@storage_path.blank? && Redmine::Configuration['attachments_storage_path'].present?
@@storage_path = Rails.root.join('files/dmsf').to_s if @@storage_path.blank?
Dir.mkdir(@@storage_path) unless File.exists?(@@storage_path)
end