don't overwrite content with junk

pull/454/head
yann300 7 years ago
parent 014271da71
commit b522bccf5b
  1. 4
      src/services/sharedFolder.js

@ -64,6 +64,10 @@ module.exports = {
set: function (args, cb) {
var path = utils.absolutePath(args.path, this.sharedFolder)
if (fs.existsSync(path) && !isRealPath(path, cb)) return
if (args.content === 'undefined') { // no !!!!!
console.log('trying to write "undefined" ! stopping.')
return
}
this.trackDownStreamUpdate[path] = path
fs.writeFile(path, args.content, 'utf8', (error, data) => {
if (error) console.log(error)

Loading…
Cancel
Save