diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-12-14 17:48:11 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-12-14 17:48:11 +0000 |
commit | 38b185f1dc4d296eb49c94a3ccff7496b1367c84 (patch) | |
tree | 2faf790baf5710f196bba5b144a20a3576ca42f5 /app | |
parent | e69631f26c46efe50a0faa800ccd47f33535fd8e (diff) | |
download | redmine-38b185f1dc4d296eb49c94a3ccff7496b1367c84.tar.gz redmine-38b185f1dc4d296eb49c94a3ccff7496b1367c84.zip |
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
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/repositories_controller.rb | 3 |
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 |