From e8428a2a732fe9754acd8f23653c7f1971d8ab83 Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 21 Oct 2020 18:13:10 +0530 Subject: [PATCH] prevent a case of multiple callbacks --- lib/storage/blob.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/storage/blob.js b/lib/storage/blob.js index 21f38a73a..dfbc802b4 100644 --- a/lib/storage/blob.js +++ b/lib/storage/blob.js @@ -378,7 +378,10 @@ var makeWalker = function (n, handleChild, done) { nThen(function (w) { // check if the path is a directory... Fs.stat(path, w(function (err, stats) { - if (err) { return next(); } + if (err) { + w.abort(); + return next(); + } if (!stats.isDirectory()) { w.abort(); return void handleChild(void 0, path, next);