From 635410d62c9d8c868be14a11b4c69cc5ed864f20 Mon Sep 17 00:00:00 2001 From: Karel Picman Date: Wed, 23 Apr 2014 09:32:33 +0200 Subject: [PATCH] #249 Storage path for DMSF files ignores global storage path for attachments --- app/models/dmsf_file.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/dmsf_file.rb b/app/models/dmsf_file.rb index 8d591f05..df0b3953 100644 --- a/app/models/dmsf_file.rb +++ b/app/models/dmsf_file.rb @@ -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