Commit 3d11a226 authored by Toshi MARUYAMA's avatar Toshi MARUYAMA Committed by Eric Davis

scm: fix non ASCII filename downloaded from repo is broken on Internet Explorer (#7288).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4816 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 52822ad5
......@@ -124,7 +124,7 @@ class RepositoriesController < ApplicationController
(show_error_not_found; return) unless @content
if 'raw' == params[:format] || @content.is_binary_data? || (@entry.size && @entry.size > Setting.file_max_size_displayed.to_i.kilobyte)
# Force the download
send_data @content, :filename => @path.split('/').last
send_data @content, :filename => filename_for_content_disposition(@path.split('/').last)
else
# Prevent empty lines when displaying a file with Windows style eol
@content.gsub!("\r\n", "\n")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment