Commit ae2fa152 authored by yann300's avatar yann300

check if file already exist

parent 18f43dba
......@@ -47,7 +47,7 @@ module.exports = {
set: function (args, cb) {
var path = utils.absolutePath(args.path, this.sharedFolder)
if (!isRealPath(path, cb)) return
if (fs.existsSync(path) && !isRealPath(path, cb)) return
this.trackDownStreamUpdate[path] = path
fs.writeFile(path, args.content, 'utf8', (error, data) => {
if (error) console.log(error)
......
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