Skip to content

Commit

Permalink
remove unnecessary checking of EPERM error
Browse files Browse the repository at this point in the history
  • Loading branch information
manidlou committed Feb 6, 2018
1 parent 24cca15 commit 6765eff
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/move/index.js
Expand Up @@ -51,7 +51,6 @@ function doRename (src, dest, overwrite, cb) {
function rename (src, dest, overwrite, cb) {
fs.rename(src, dest, err => {
if (!err) return cb()
if (err.code === 'EPERM') return moveAcrossDevice(src, dest, overwrite, cb)
if (err.code !== 'EXDEV') return cb(err)
return moveAcrossDevice(src, dest, overwrite, cb)
})
Expand Down

0 comments on commit 6765eff

Please sign in to comment.