--- IO-AIO/AIO.pm 2005/12/26 18:15:23 1.42 +++ IO-AIO/AIO.pm 2005/12/26 19:20:26 1.45 @@ -69,7 +69,7 @@ use Fcntl (); BEGIN { - $VERSION = '1.61'; + $VERSION = '1.71'; @EXPORT = qw(aio_sendfile aio_read aio_write aio_open aio_close aio_stat aio_lstat aio_unlink aio_rmdir aio_readdir aio_scandir aio_symlink @@ -321,7 +321,7 @@ # if nlink == 2, we are finished # on non-posix-fs's, we rely on nlink < 2 $ndirs = (stat _)[3] - 2 - or $cb->([], $entries); + or return $cb->([], $entries); } # sort into likely dirs and likely nondirs @@ -347,7 +347,7 @@ # finished undef $statcb; undef $schedcb; - $cb->(\@dirs, \@nondirs); + $cb->(\@dirs, \@nondirs) if $cb; undef $cb; } };