Skip to content

Commit

Permalink
Merge pull request #334 from jprichardson/move-cleanup
Browse files Browse the repository at this point in the history
Cleanup lib/move/index.js
  • Loading branch information
jprichardson committed Jan 1, 2017
2 parents f6e2109 + 90cbf82 commit 80ec80d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/move/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,12 @@ function moveFileAcrossDevice (source, dest, overwrite, callback) {

function moveDirAcrossDevice (source, dest, overwrite, callback) {
var options = {
stopOnErr: true,
overwrite: false
}

function startNcp () {
ncp(source, dest, options, function (errList) {
if (errList) return callback(errList[0])
ncp(source, dest, options, function (err) {
if (err) return callback(err)
remove(source, callback)
})
}
Expand Down

0 comments on commit 80ec80d

Please sign in to comment.