Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix CHANGE-DIR (don't make an IO::Path)
  • Loading branch information
lizmat committed Nov 29, 2014
1 parent f4496d2 commit e84fb7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/IO.pm
Expand Up @@ -131,9 +131,9 @@ sub REMOVE-ROOT(Str $r, Str $p) {

sub CHANGE-DIRECTORY($path,$base,&test) {

my $abspath = MAKE-CLEAN-PARTS(MAKE-ABSOLUTE-PATH($path,$base)).join('/');
my $abspath := MAKE-CLEAN-PARTS(MAKE-ABSOLUTE-PATH($path,$base)).join('/');
FILETEST-E($abspath) && FILETEST-D($abspath) && test($abspath)
?? IO::Path.new-from-absolute-path($abspath.chop)
?? IO::Dir.new(:$abspath)
!! fail X::IO::Chdir.new(
:$path,
:os-error( "does not exist, is not a dir or no access" ),
Expand Down

0 comments on commit e84fb7e

Please sign in to comment.