Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix copy() breakage when specifying relative paths
  • Loading branch information
lizmat committed Oct 3, 2014
1 parent da3aae7 commit faf7805
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/IO/Path.pm
Expand Up @@ -188,15 +188,15 @@ my class IO::Path is Cool does IO::FileTestable {
multi method copy(IO::Path:D: IO::Path:D $to, :$createonly) {
if $createonly and $to.e {
fail X::IO::Copy.new(
:from(nqp::box_s($!path,Str)),
:from(self),
:$to,
:os-error(':createonly specified and destination exists'),
);
}
nqp::copy($!path, nqp::unbox_s($to.path));
nqp::copy($.abspath, nqp::unbox_s($to.abspath));
CATCH { default {
fail X::IO::Copy.new(
:from(nqp::box_s($!path,Str)), :$to, :os-error(.Str) );
:from(self), :$to, :os-error(.Str) );
} }
True;
}
Expand Down

0 comments on commit faf7805

Please sign in to comment.