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