Permalink
Browse files

Fix bundled Shell::Command to ignore already removed paths in rm_rf()

  • Loading branch information...
1 parent a540262 commit e3d78a5b4b3e2dcc795604214305b5ab9c34faed @japhb japhb committed Aug 20, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 ext/File__Tools/lib/Shell/Command.pm
@@ -24,6 +24,7 @@ sub rm_f(*@files) is export {
sub rm_rf(*@files) is export {
for @files -> $path {
+ next unless $path.IO.e;
for find(dir => $path).map({ .Str }).reverse -> $f {
$f.IO.d ?? rmdir($f) !! unlink($f);
}

0 comments on commit e3d78a5

Please sign in to comment.