Skip to content

Commit

Permalink
Merge pull request #462 from ugexe/patch-9
Browse files Browse the repository at this point in the history
bugfix: chdir ensure `.` is resolved to abspath
  • Loading branch information
lizmat committed Jul 7, 2015
2 parents da530e3 + d524b22 commit f0816d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/IO/Path.pm
Expand Up @@ -252,7 +252,7 @@ my class IO::Path is Cool {
}
multi method chdir(IO::Path:D: Str() $path is copy, :$test = 'r') {
if !$!SPEC.is-absolute($path) {
my ($volume,$dirs) = $!SPEC.splitpath(self, :nofile);
my ($volume,$dirs) = $!SPEC.splitpath(self.abspath, :nofile);
my @dirs = $!SPEC.splitdir($dirs);
@dirs.shift; # the first is always empty for absolute dirs
for $!SPEC.splitdir($path) -> $dir {
Expand Down

0 comments on commit f0816d3

Please sign in to comment.