fix(commander) getAllStats: do not get response when folder is empty

This commit is contained in:
coderaiser 2014-07-07 06:53:27 -04:00
parent ddfccd54fb
commit 3361603a70

View file

@ -41,11 +41,11 @@
*/
function getAllStats(path, names, callback) {
var length = names.length,
funcs = {},
funcs = names.length ? {} : [],
dir = format.addSlashToEnd(path);
if (!length)
funcs.exec = Util.exec.ret;
funcs.push(Util.exec);
else
names.forEach(function(name) {
var path = dir + name;