diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index dfd5d0a6..ef332eb3 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