From: Jean-Philippe Lang Date: Sat, 12 Dec 2009 10:35:16 +0000 (+0000) Subject: Retrieve root_url if needed (#4377). X-Git-Tag: 0.9.0~104 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=008f35277e667176095a1d7c846dc70f44e8fa70;p=redmine.git Retrieve root_url if needed (#4377). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3158 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/models/repository/subversion.rb b/app/models/repository/subversion.rb index f84e4c089..3eec5a611 100644 --- a/app/models/repository/subversion.rb +++ b/app/models/repository/subversion.rb @@ -84,6 +84,6 @@ class Repository::Subversion < Repository # url = file:///var/svn/foo/bar # => returns /bar def relative_url - @relative_url ||= url.gsub(Regexp.new("^#{Regexp.escape(root_url)}", Regexp::IGNORECASE), '') + @relative_url ||= url.gsub(Regexp.new("^#{Regexp.escape(root_url || scm.root_url)}", Regexp::IGNORECASE), '') end end