lib/rubygems/indexer.rb in rubygems-update-0.9.5 vs lib/rubygems/indexer.rb in rubygems-update-1.0.0
- old
+ new
@@ -96,10 +96,10 @@
say "Moving index into production dir #{@dest_directory}" if verbose
files = @master_index.files + @quick_index.files + @marshal_index.files
files.each do |file|
- relative_name = file[/\A#{@directory}.(.*)/, 1]
+ relative_name = file[/\A#{Regexp.escape @directory}.(.*)/, 1]
dest_name = File.join @dest_directory, relative_name
FileUtils.rm_rf dest_name, :verbose => verbose
FileUtils.mv file, @dest_directory, :verbose => verbose
end