From 6d5db302eeabd3a64ba6c1106e3eadde1ad05aae Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 7 Jun 2008 10:08:11 +0000 Subject: [PATCH] Subversion adapter: ignore directories with no commit date (#1370). git-svn-id: http://redmine.rubyforge.org/svn/trunk@1500 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/scm/adapters/subversion_adapter.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/redmine/scm/adapters/subversion_adapter.rb b/lib/redmine/scm/adapters/subversion_adapter.rb index 40c7eb3f1..1cbdce135 100644 --- a/lib/redmine/scm/adapters/subversion_adapter.rb +++ b/lib/redmine/scm/adapters/subversion_adapter.rb @@ -64,6 +64,9 @@ module Redmine begin doc = REXML::Document.new(output) doc.elements.each("lists/list/entry") do |entry| + # Skip directory if there is no commit date (usually that + # means that we don't have read access to it) + next if entry.attributes['kind'] == 'dir' && entry.elements['commit'].elements['date'].nil? entries << Entry.new({:name => entry.elements['name'].text, :path => ((path.empty? ? "" : "#{path}/") + entry.elements['name'].text), :kind => entry.attributes['kind'], -- 2.39.5