Fixed: empty lines when displaying repository files with Windows style eol.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@993 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2007-12-14 17:48:11 +00:00
parent e69631f26c
commit 38b185f1dc
1 changed files with 3 additions and 0 deletions

View File

@ -92,6 +92,9 @@ class RepositoriesController < ApplicationController
show_error and return unless @content
if 'raw' == params[:format]
send_data @content, :filename => @path.split('/').last
else
# Prevent empty lines when displaying a file with Windows style eol
@content.gsub!("\r\n", "\n")
end
end