Permalink
Browse files

fix thinko in dir(), bug found by dagurval++

  • Loading branch information...
1 parent 570d1d6 commit 849f4f68644ed7acdc49d0c23ecff55e806cdbed @labster labster committed May 19, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/IO.pm
View
@@ -347,7 +347,7 @@ sub dir(Cool $path = '.', Mu :$test = none('.', '..')) {
my Mu $RSA := pir::new__PS('OS').readdir(nqp::unbox_s($path.Str));
my int $elems = nqp::elems($RSA);
my @res;
- my ($directory, $volume) = IO::Spec.splitpath(~$path, :nofile);
+ my ($volume, $directory) = IO::Spec.splitpath(~$path, :nofile);
loop (my int $i = 0; $i < $elems; $i = $i + 1) {
my Str $file := nqp::p6box_s(pir::trans_encoding__Ssi(
nqp::atpos_s($RSA, $i),

0 comments on commit 849f4f6

Please sign in to comment.