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) {