##// END OF EJS Templates
Fixed Trac importer broken by r2670 (#3254)....
Jean-Philippe Lang -
r2609:ad1ffa06a070
parent child
Show More
@@ -135,8 +135,15 namespace :redmine do
135 135 File.file? trac_fullpath
136 136 end
137 137
138 def read
139 File.open("#{trac_fullpath}", 'rb').read
138 def open
139 File.open("#{trac_fullpath}", 'rb') {|f|
140 @file = f
141 yield self
142 }
143 end
144
145 def read(*args)
146 @file.read(*args)
140 147 end
141 148
142 149 def description
@@ -506,12 +513,14 namespace :redmine do
506 513 # Attachments
507 514 ticket.attachments.each do |attachment|
508 515 next unless attachment.exist?
516 attachment.open {
509 517 a = Attachment.new :created_on => attachment.time
510 518 a.file = attachment
511 519 a.author = find_or_create_user(attachment.author)
512 520 a.container = i
513 521 a.description = attachment.description
514 522 migrated_ticket_attachments += 1 if a.save
523 }
515 524 end
516 525
517 526 # Custom fields
General Comments 0
You need to be logged in to leave comments. Login now