Skip to content

Commit

Permalink
destructure stats object after checking err
Browse files Browse the repository at this point in the history
  • Loading branch information
manidlou committed Aug 31, 2018
1 parent d96adb3 commit 60e0210
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/copy/copy.js
Expand Up @@ -159,8 +159,9 @@ function copyDirItems (items, src, dest, opts, cb) {
function copyDirItem (items, item, src, dest, opts, cb) {
const srcItem = path.join(src, item)
const destItem = path.join(dest, item)
checkPaths(srcItem, destItem, (err, {destStat}) => {
checkPaths(srcItem, destItem, (err, stats) => {
if (err) return cb(err)
const {destStat} = stats
startCopy(destStat, srcItem, destItem, opts, err => {
if (err) return cb(err)
return copyDirItems(items, src, dest, opts, cb)
Expand Down

0 comments on commit 60e0210

Please sign in to comment.