From 38b185f1dc4d296eb49c94a3ccff7496b1367c84 2007-12-14 17:48:11 From: Jean-Philippe Lang Date: 2007-12-14 17:48:11 Subject: [PATCH] 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 --- diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index dfd5d0a..ef332eb 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -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