Commit ace74ef2 authored by ioedeveloper's avatar ioedeveloper

Return callback with error on fail

parent 11408640
......@@ -112,7 +112,10 @@ module.exports = {
}
if (!isRealPath(path, cb)) return
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)
})
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment