From: Jean-Philippe Lang Date: Wed, 11 Nov 2009 15:33:30 +0000 (+0000) Subject: Reject empty Mercurial entries (#4098). X-Git-Tag: 0.9.0~221 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=22d12032e75d60bf6ce2668d98a8cff714ce2bc5;p=redmine.git Reject empty Mercurial entries (#4098). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3029 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/lib/redmine/scm/adapters/mercurial_adapter.rb b/lib/redmine/scm/adapters/mercurial_adapter.rb index ee7d7ea9d..79e2d13e2 100644 --- a/lib/redmine/scm/adapters/mercurial_adapter.rb +++ b/lib/redmine/scm/adapters/mercurial_adapter.rb @@ -93,7 +93,7 @@ module Redmine :path => (path.nil? or path.empty? ? e.first : "#{with_trailling_slash(path)}#{e.first}"), :kind => (e.size > 1 ? 'dir' : 'file'), :lastrev => Revision.new - }) unless entries.detect{|entry| entry.name == e.first} + }) unless e.empty? || entries.detect{|entry| entry.name == e.first} end end end