]> source.dussan.org Git - redmine.git/commitdiff
Retrieve root_url if needed (#4377).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 12 Dec 2009 10:35:16 +0000 (10:35 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 12 Dec 2009 10:35:16 +0000 (10:35 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3158 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/repository/subversion.rb

index f84e4c089204de7ad1dda30238bd17c2e6b49322..3eec5a611880a06876f14ff910963cfd1d83aacd 100644 (file)
@@ -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