From 99b0c71b6fd4d75ba295edb148acb82d612981aa Mon Sep 17 00:00:00 2001 From: Graham Hay Date: Wed, 2 Apr 2014 12:29:27 +0100 Subject: [PATCH] Call callback on error --- lib/dirsum.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dirsum.js b/lib/dirsum.js index 33e98dd..0d97930 100644 --- a/lib/dirsum.js +++ b/lib/dirsum.js @@ -61,7 +61,7 @@ function digest(root, method, callback) { if (stats.isDirectory()) { return digest(path, method, function(err, hash) { - if (err) return hash; + if (err) return callback(err); hashes[f] = hash; if (++hashed >= files.length) {