]> source.dussan.org Git - redmine.git/commitdiff
scm: cvs: convert encoding of command line arguments (#3462).
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 15 Apr 2011 07:16:04 +0000 (07:16 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 15 Apr 2011 07:16:04 +0000 (07:16 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5462 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/scm/adapters/cvs_adapter.rb

index 7c1e3066e7242f7c226f3fa44be463d281fb63ff..73a1c2c3b94e342f1977cd52c6431c582702b02b 100644 (file)
@@ -373,7 +373,11 @@ module Redmine
         def scm_cmd(*args, &block)
           full_args = [CVS_BIN, '-d', root_url]
           full_args += args
-          ret = shellout(full_args.map { |e| shell_quote e.to_s }.join(' '), &block)
+          full_args_locale = []
+          full_args.map do |e|
+            full_args_locale << scm_iconv(@path_encoding, 'UTF-8', e)
+          end
+          ret = shellout(full_args_locale.map { |e| shell_quote e.to_s }.join(' '), &block)
           if $? && $?.exitstatus != 0
             raise ScmCommandAborted, "cvs exited with non-zero status: #{$?.exitstatus}"
           end