1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-19 23:11:12 +00:00

Fix FrozenError in RepositoriesController#diff (#31052, #26561).

Patch by Mizuki ISHIKAWA.


git-svn-id: http://svn.redmine.org/redmine/trunk@17990 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA 2019-03-19 02:42:58 +00:00
parent bf67729a28
commit 7d2f10ccac

View File

@ -239,7 +239,7 @@ class RepositoriesController < ApplicationController
if params[:format] == 'diff' if params[:format] == 'diff'
@diff = @repository.diff(@path, @rev, @rev_to) @diff = @repository.diff(@path, @rev, @rev_to)
(show_error_not_found; return) unless @diff (show_error_not_found; return) unless @diff
filename = "changeset_r#{@rev}" filename = +"changeset_r#{@rev}"
filename << "_r#{@rev_to}" if @rev_to filename << "_r#{@rev_to}" if @rev_to
send_data @diff.join, :filename => "#{filename}.diff", send_data @diff.join, :filename => "#{filename}.diff",
:type => 'text/x-patch', :type => 'text/x-patch',