From 34bfe3ba1fbeba2d0b87c60acaff8972bbec831d Mon Sep 17 00:00:00 2001 From: Artur Adib Date: Thu, 1 Mar 2012 21:02:37 -0500 Subject: [PATCH] expand() fix --- shell.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shell.js b/shell.js index a385506..56c44f1 100644 --- a/shell.js +++ b/shell.js @@ -178,7 +178,7 @@ function _cp(options, sources, dest) { if (arguments.length < 3) { error('missing and/or '); } else if (arguments.length > 3) { - sources = arguments.slice(1, arguments.length - 1); + sources = [].slice.call(arguments, 1, arguments.length - 2); dest = arguments[arguments.length - 1]; } @@ -1069,7 +1069,7 @@ function expand(list) { list.forEach(function(listEl) { // Wildcard present? if (listEl.search(/\*/) > -1) { - for (file in _ls(listEl)) + for (file in _ls('', listEl)) expanded.push(file); } else { expanded.push(listEl);