summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/repositories_controller.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb
index dfd5d0a6f..ef332eb37 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