Incomplete copy of a file to another project #651
This commit is contained in:
parent
15a0c89eb4
commit
4e1072e8d2
@ -276,7 +276,7 @@ class DmsfFile < ActiveRecord::Base
|
||||
def copy_to(container, folder = nil)
|
||||
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
|
||||
if (self.project != project) && self.last_revision
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user