Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't try to copy directories in IO::copy. Previously it hanged, now …
…it gives a friendly die()
  • Loading branch information
Tadeusz Sośnierz committed Mar 13, 2011
1 parent a357c9f commit 592e298
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/IO.pm
Expand Up @@ -191,6 +191,9 @@ class IO is Cool {
}

multi method copy($dest as Str) {
if self.d() {
die "Cannot copy '$.path': Is a directory"
}
try {
pir::new__PS('File').copy($.path, $dest);
}
Expand Down

0 comments on commit 592e298

Please sign in to comment.