diff --git a/lib/providers/filesystem/index.js b/lib/providers/filesystem/index.js index 9285103..1e8b215 100644 --- a/lib/providers/filesystem/index.js +++ b/lib/providers/filesystem/index.js @@ -199,6 +199,7 @@ FileSystemProvider.prototype.getFiles = function (container, options, cb) { if (!validateName(container, cb)) return; var dir = path.join(this.root, container); fs.readdir(dir, function (err, entries) { + entries = entries ? entries : []; var files = []; var tasks = []; entries.forEach(function (f) { diff --git a/lib/storage-service.js b/lib/storage-service.js index 0f1ee66..6ef4b5e 100644 --- a/lib/storage-service.js +++ b/lib/storage-service.js @@ -154,8 +154,8 @@ StorageService.prototype.downloadStream = function (container, file, options, cb * @param {Object|String} err Error string or object * @param {Object[]} files An array of file metadata objects */ -StorageService.prototype.getFiles = function (container, options, cb) { - return this.client.getFiles(container, options, function (err, files) { +StorageService.prototype.getFiles = function (container, cb) { + return this.client.getFiles(container, false, function (err, files) { if (err) { cb(err, files); } else {