Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Check for filename length instead of truthiness.
Otherwise, if a directory contains a file named '0', we assume no more
files exist (while there could still be any number left)
  • Loading branch information
retupmoca committed May 11, 2014
1 parent 5c160e7 commit dd4a0e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/IO.pm
Expand Up @@ -563,7 +563,7 @@ my class IO::Path is Cool does IO::FileTestable {
#?if !parrot
loop {
my Str $elem := nqp::nextfiledir($dirh);
if nqp::isnull_s($elem) || !$elem {
if nqp::isnull_s($elem) || !$elem.chars {
nqp::closedir($dirh);
last;
} else {
Expand Down

0 comments on commit dd4a0e6

Please sign in to comment.