Commits

Anonymous committed 52cdadc

Converted isdot to $top->isdot($self).

  • Participants
  • Parent commits 3ed1e0a

Comments (0)

Files changed (1)

File lib/File/Find/Object.pm

    
     $self->{currentfile} or return 0;
 
-    $self->isdot and return 0;
+    $self->_top->isdot($self) and return 0;
     $self->_top->filter($self) or return 0;  
 
     foreach ($self->_top->{depth} ? qw/b a/ : qw/a b/) {
     0
 }
 
-sub isdot {
-    my ($self) = @_;
-    if ($self->{currentfile} eq '..' || $self->{currentfile} eq '.') {
-        return 1;
-    }
-    return 0;
+sub isdot
+{
+    my ($self, $current) = @_;
+
+    my $file = $current->{currentfile};
+
+    return ($file eq ".." || $file eq ".");
 }
 
 sub filter {