Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[IO::Path] fix handling of local paths in .new(Str)
  • Loading branch information
moritz committed Aug 7, 2012
1 parent d9c09e8 commit fefacce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/IO.pm
Expand Up @@ -248,7 +248,7 @@ my class IO::Path is Cool does IO::FileTestable {
multi method new(Str:D $path) {
my @chunks = $path.split('/');
my $basename = @chunks.pop;
my $directory = @chunks.join('/');
my $directory = @chunks ?? @chunks.join('/') !! '.';
self.new(:$basename, :$directory);
}

Expand Down

0 comments on commit fefacce

Please sign in to comment.