Created
August 19, 2015 16:04
-
-
Save anonymous/5481d2e6df95b8fd5e78 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git diff | |
diff --git a/lib/Shell/Command.pm b/lib/Shell/Command.pm | |
index c3e87a0..2ca0b61 100644 | |
--- a/lib/Shell/Command.pm | |
+++ b/lib/Shell/Command.pm | |
@@ -47,7 +47,7 @@ sub mv(*@args) is export { | |
sub cp($from as Str, $to as Str, :$r) is export { | |
if ($from.IO ~~ :d and $r) { | |
mkdir("$to") if $to.IO !~~ :d; | |
- for dir($from)».basename -> $item { | |
+ for dir($from).map(*.basename) -> $item { | |
mkdir("$to/$item") if "$from/$item".IO ~~ :d; | |
cp("$from/$item", "$to/$item", :r); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment