]> source.dussan.org Git - redmine.git/commitdiff
scm: filesystem: prevent exception raises if path encoding is incorrect.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 20 Mar 2011 14:06:49 +0000 (14:06 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 20 Mar 2011 14:06:49 +0000 (14:06 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5173 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/scm/adapters/filesystem_adapter.rb

index 3f3f131e234218ca5a70b92a05db7d5d98c9ded3..77977d8853b56e6ef3050868df0209ef38044f0c 100644 (file)
@@ -60,7 +60,9 @@ module Redmine
           trgt = scm_iconv(@path_encoding, 'UTF-8', trgt_utf8)
           Dir.new(trgt).each do |e1|
             e_utf8 = scm_iconv('UTF-8', @path_encoding, e1)
-            relative_path_utf8 = format_path_ends((format_path_ends(path,false,true) + e_utf8),false,false)
+            next if e_utf8.blank? 
+            relative_path_utf8 = format_path_ends(
+                (format_path_ends(path,false,true) + e_utf8),false,false)
             t1_utf8 = target(relative_path_utf8)
             t1 = scm_iconv(@path_encoding, 'UTF-8', t1_utf8)
             relative_path = scm_iconv(@path_encoding, 'UTF-8', relative_path_utf8)