Remove extra #dup (#26561).

git-svn-id: http://svn.redmine.org/redmine/trunk@17995 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA 2019-03-21 00:45:56 +00:00
parent 21769bb59e
commit 4a37bac866

View File

@ -248,10 +248,9 @@ module Redmine
end
def self.branch_conf_path(path)
return unless path
return if path.nil?
m = path.match(%r{^(.*[/\\])\.bzr.*$})
bcp = m ? m[1] : path.dup
bcp.gsub!(%r{[\/\\]$}, "")
bcp = (m ? m[1] : path).gsub(%r{[\/\\]$}, "")
File.join(bcp, ".bzr", "branch", "branch.conf")
end