Skip to content

Commit

Permalink
Merge pull request #38 from ulikoehler/patch-1
Browse files Browse the repository at this point in the history
Return err in copy() fstat cb, because stat could be undefined or null
  • Loading branch information
jprichardson committed Oct 24, 2013
2 parents 9740acb + e10b89f commit cfdf243
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function copy(src, dest, filter, callback) {
callback = callback || function(){}

fs.lstat(src, function(err, stats) {
if (err) callback(err)
if (err) return callback(err)

var dir = null
if (stats.isDirectory()) {
Expand Down

0 comments on commit cfdf243

Please sign in to comment.