X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FApp%2FRgit%2FConfig%2FDefault.pm;h=028e106a2302f351a47dd0e0393c1aa4fde4f70a;hb=c4df0499041f9632e0b0bdfcf563b28565b503d0;hp=543891c19ce2b5c522001d7cd8421fd08fa27e0f;hpb=787cc59d827d22afa8a3100daa42e5b9df3fe50d;p=perl%2Fmodules%2Frgit.git diff --git a/lib/App/Rgit/Config/Default.pm b/lib/App/Rgit/Config/Default.pm index 543891c..028e106 100644 --- a/lib/App/Rgit/Config/Default.pm +++ b/lib/App/Rgit/Config/Default.pm @@ -43,12 +43,14 @@ sub repos { my %repos; find { wanted => sub { - return unless -d $_; - my $r = App::Rgit::Repository->new(dir => $File::Find::name); - $repos{$r->repo} = $r if $r + return if m{(?:^|/)\.\.?$} + or not (-d $_ and -r _); + my $r = App::Rgit::Repository->new(dir => $_); + $repos{$r->repo} = $r if $r and not exists $repos{$r->repo}; }, - follow => 1 + follow => 1, + no_chdir => 1, }, $self->root; $self->{repos} = [ sort { $a->repo cmp $b->repo } values %repos ]; }