Commits

Anonymous committed 2d9a23a

- Now checking for inodes that are 0, when checking for cyclical trees,
as a fix for stat() calls on systems that do not support them. This should
fix Win32 test failures (and bad behaviour in general) like the following: - http://nntp.x.perl.org/group/perl.cpan.testers/2479582

Comments (0)

Files changed (2)

 
     - Corrected the README.
+    - Now checking for inodes that are 0, when checking for cyclical trees,
+    as a fix for stat() calls on systems that do not support them. This should
+    fix Win32 test failures (and bad behaviour in general) like the following:          - http://nntp.x.perl.org/group/perl.cpan.testers/2479582
 
 0.1.1 - Wed Oct 22 12:30:56 IST 2008
     - Potential Security Fix!!! No longer passing a filename directly to

lib/File/Find/Object/Base.pm

     # $st is an array ref with the return of perldoc -f stat .
     my $st = shift;
 
-    return ($self->_dev() == $st->[0] && $self->_inode() == $st->[1]);
+    # On MS-Windows, all inodes in stat are returned as 0, so we need to 
+    # check that both inodes are not zero. This is why there's the 
+    # $self->_inode() != 0 check at the end.
+    return
+    (   
+        $self->_dev() == $st->[0]
+     && $self->_inode() == $st->[1]
+     && $self->_inode() != 0
+    );
 }
 
 sub _mystat