GetFiles issues
Only 2 arguments passed in to GetFiles but it was expecting 3 thus “cb” was undefined… File System GetFiles should handle empty “entries” array properly…
This commit is contained in:
parent
51a206adc6
commit
7d3c41a082
|
@ -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) {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue