Permalink
Browse files

Idiomaticism and Win32 fixes for dir(...).

  • Loading branch information...
1 parent 09be2b6 commit 532a3b939e932c06477206c4e3552e4b7a51a64e @jnthn jnthn committed Jul 1, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/core/IO.pm
View
@@ -463,13 +463,13 @@ my class IO::Path is Cool does IO::FileTestable {
my $next = 1;
gather {
take $_.path if $_ ~~ $test for ".", "..";
- while $next {
+ loop {
my Str $elem := nqp::nextfiledir($dirh);
if nqp::isnull_s($elem) {
nqp::closedir($dirh);
- $next = 0;
+ last;
} else {
- if $elem.substr(0, 2) eq "./" {
+ if $elem.substr(0, 2) eq any("./", ".\\") {
$elem := $elem.substr(2);
}
take $elem.path if $elem ~~ $test;

0 comments on commit 532a3b9

Please sign in to comment.