Skip to content

Instantly share code, notes, and snippets.

Created August 19, 2015 22:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/71682f09109a5169e5d5 to your computer and use it in GitHub Desktop.
Save anonymous/71682f09109a5169e5d5 to your computer and use it in GitHub Desktop.
From af1860e1932c63518265857b85d4bb5d4cc819b4 Mon Sep 17 00:00:00 2001
From: laben <labensigma@gmail.com>
Date: Thu, 20 Aug 2015 00:23:42 +0200
Subject: [PATCH] Fix cp function for GLR
---
lib/Shell/Command.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
}
--
2.5.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment