Permalink
Browse files

Fix a few more Windows/OS PMC/encoding issues for tadzik++.

  • Loading branch information...
1 parent 9db2d9b commit 2bbe52723521e88898163c57778b222c6e591357 @jnthn jnthn committed Aug 18, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/core/IO.pm
View
@@ -288,7 +288,9 @@ sub dir(Cool $path = '.', Mu :$test = none('.', '..')) {
my int $elems = pir::set__IP($RSA);
my @res;
loop (my int $i = 0; $i < $elems; $i = $i + 1) {
- my Str $file := nqp::p6box_s(nqp::atpos($RSA, $i));
+ my Str $file := nqp::p6box_s(pir::trans_encoding__Ssi(
+ nqp::atpos_s($RSA, $i),
+ pir::find_encoding__Is('utf8')));
if $file ~~ $test {
@res.push: IO::Path.new(:basename($file), :dir($path.Str));
}
@@ -429,7 +431,7 @@ my class X::IO::Chdir { ... }
proto sub chdir(|) { * }
multi sub chdir($path as Str) {
pir::new__PS('OS').chdir(nqp::unbox_s($path));
- $*CWD = nqp::p6box_s(pir::new__PS('OS').cwd);
+ $*CWD = cwd();
return True;
CATCH {
default {

0 comments on commit 2bbe527

Please sign in to comment.