summaryrefslogtreecommitdiffstats
path: root/lib/redmine/scm/adapters
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-05-25 23:50:59 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-05-25 23:50:59 +0000
commit793accb14aedd74451aa4b7ae95b29eb5aef09b2 (patch)
tree0266207127ef8e949eca28353f23d067ad20980a /lib/redmine/scm/adapters
parent747e3c82f607472868293ce35d95570449c475fb (diff)
downloadredmine-793accb14aedd74451aa4b7ae95b29eb5aef09b2.tar.gz
redmine-793accb14aedd74451aa4b7ae95b29eb5aef09b2.zip
scm: switch to use shell quote with parameter in abstract adapter target().
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5906 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/scm/adapters')
-rw-r--r--lib/redmine/scm/adapters/abstract_adapter.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/redmine/scm/adapters/abstract_adapter.rb b/lib/redmine/scm/adapters/abstract_adapter.rb
index 81a24af81..afff2ffd7 100644
--- a/lib/redmine/scm/adapters/abstract_adapter.rb
+++ b/lib/redmine/scm/adapters/abstract_adapter.rb
@@ -184,10 +184,14 @@ module Redmine
info ? info.root_url : nil
end
- def target(path)
+ def target(path, sq=true)
path ||= ''
base = path.match(/^\//) ? root_url : url
- shell_quote("#{base}/#{path}".gsub(/[?<>\*]/, ''))
+ str = "#{base}/#{path}".gsub(/[?<>\*]/, '')
+ if sq
+ str = shell_quote(str)
+ end
+ str
end
def logger