swg | 10 ++++++++-- diff --git a/swg b/swg index 84814214d265d2448511ec79e333d5926735e4d9c2afb5425b8bdab60fd12481..eb5470bb2ddd6d91c68c95f7bde59c4a9a4cf21b26e3f25a5d5b0f62f6da4d74 100755 --- a/swg +++ b/swg @@ -69,13 +69,19 @@ my $fn = $_; $pth = decode q{UTF-8}, $File::Find::name; $pth =~ s/^[.]\/?//; foreach (split /\//, $pth) { - return if (/^[.]/); + if (/^[.]/) { + $File::Find::prune = 1; + return; + } } if (-d $fn) { $pth .= q{/}; } foreach (@ignores) { - return if $pth =~ /$_/; + if ($pth =~ /$_/) { + $File::Find::prune = 1; + return; + } } if ($ARGV[0] eq q{files}) { print "$pth\n";