Merge pull request #74 from cajoy/master
Bugfix: Cannot read property 'forEach' of undefined
This commit is contained in:
commit
52638e65f5
|
@ -123,6 +123,8 @@ FileSystemProvider.prototype.destroyContainer = function (containerName, cb) {
|
|||
|
||||
var dir = path.join(this.root, containerName);
|
||||
fs.readdir(dir, function (err, files) {
|
||||
files = files || [];
|
||||
|
||||
var tasks = [];
|
||||
files.forEach(function (f) {
|
||||
tasks.push(fs.unlink.bind(fs, path.join(dir, f)));
|
||||
|
|
Loading…
Reference in New Issue