Unverified Commit 9e1eff9e authored by yann300's avatar yann300 Committed by GitHub

Merge pull request #104 from ethereum/filemanager-api

Return true on file/directory remove success
parents a0b84384 ace74ef2
......@@ -111,9 +111,12 @@ module.exports = {
return cb('File not found ' + path)
}
if (!isRealPath(path, cb)) return
fs.remove(path, (error, data) => {
if (error) console.log(error)
cb(error, data)
fs.remove(path, (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