Merge pull request #104 from ethereum/filemanager-api

Return true on file/directory remove success
pull/3094/head
yann300 5 years ago committed by GitHub
commit 2ded945102
  1. 9
      src/services/sharedFolder.js

@ -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)
})
},

Loading…
Cancel
Save