Incomplete copy of a file to another project #651
This commit is contained in:
parent
a71078112a
commit
15a0c89eb4
@ -22,6 +22,7 @@ Changelog for Redmine DMSF
|
||||
Global title format for downloading
|
||||
New columns in the main DMSF view; columns are configurable from the plugin settings
|
||||
|
||||
* Bug: #651 - Incomplete copy of a file to another project
|
||||
* New: #641 - Documents export
|
||||
* New: #635 - Edit approval workflow steps
|
||||
* Bug: #632 - database migration error (from ver 0.9.1 to ver 1.5.8)
|
||||
|
||||
@ -277,10 +277,8 @@ class DmsfFile < ActiveRecord::Base
|
||||
project = container.is_a?(Project) ? container : container.project
|
||||
# If the target project differs from the source project we must physically move the disk files
|
||||
if self.project != project
|
||||
self.dmsf_file_revisions.all.each do |rev|
|
||||
if File.exist? rev.disk_file(self.project)
|
||||
FileUtils.cp rev.disk_file(self.project), rev.disk_file(project)
|
||||
end
|
||||
if File.exist? self.last_revision.disk_file(self.project)
|
||||
FileUtils.cp self.last_revision.disk_file(self.project), self.last_revision.disk_file(project)
|
||||
end
|
||||
end
|
||||
file = DmsfFile.new
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user