From 118bb0a2e79ecbb1134b07d1d6472fd3447d7b9f Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Wed, 29 Nov 2023 06:03:36 +0100 Subject: [PATCH] Fix pruning --- lib/Simba/DA.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/Simba/DA.pm b/lib/Simba/DA.pm index f608258..81c9332 100644 --- a/lib/Simba/DA.pm +++ b/lib/Simba/DA.pm @@ -105,10 +105,13 @@ sub list { $self->log(10, "list: in $File::Find::dir"); if ($self->{prune}{$File::Find::dir}) { return (); - } else { - # not sure if sorting is useful - return sort @_; } + my $last_component = $File::Find::dir =~ s{.*/}{}r; + if ($self->{prune}{$last_component}) { + return (); + } + # not sure if sorting is useful + return sort @_; }, wanted => sub {