Return callback with error on fail

remixd
ioedeveloper 5 years ago
parent 114086406f
commit ace74ef292
  1. 5
      src/services/sharedFolder.js

@ -112,7 +112,10 @@ module.exports = {
} }
if (!isRealPath(path, cb)) return if (!isRealPath(path, cb)) return
fs.remove(path, (error) => { fs.remove(path, (error) => {
if (error) console.log(error) if (error) {
console.log(error)
return cb('Failed to remove file/directory: ' + error)
}
cb(error, true) cb(error, true)
}) })
}, },

Loading…
Cancel
Save